Merge pull request #929 from matiu/feature/bitcore01

Updates model and tests to newest bitcore version
This commit is contained in:
Manuel Aráoz 2014-07-25 12:23:36 -03:00
commit d7650f30ff
9 changed files with 182 additions and 83 deletions

View file

@ -17,9 +17,9 @@ angular.module('copayApp.controllers').controller('ImportController',
updateStatus('Importing wallet - Setting things up...');
var w, errMsg;
// try to import encrypted wallet with passphrase
try {
w = walletFactory.import(encryptedObj, passphrase);
} catch (e) {
errMsg = e.message;
}
@ -31,12 +31,14 @@ angular.module('copayApp.controllers').controller('ImportController',
return;
}
// if wallet was never used, we're done
if (!w.isReady()) {
$rootScope.wallet = w;
controllerUtils.startNetwork($rootScope.wallet, $scope);
return;
}
// if it was used, we need to scan for indices
w.updateIndexes(function(err) {
updateStatus('Importing wallet - We are almost there...');
if (err) {