Merge pull request #2 from maraoz/feature/bitcore01

add failing test for mati to fix
This commit is contained in:
Matias Alejo Garcia 2014-07-25 10:53:46 -03:00
commit ab0aee7e89
2 changed files with 50 additions and 4 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) {

File diff suppressed because one or more lines are too long