Merge pull request #3497 from bitpay/v1.5

Update v1.6 with changes on v1.5
This commit is contained in:
Matias Alejo Garcia 2015-11-19 16:27:19 -03:00
commit bbec74dcb9
15 changed files with 196 additions and 60 deletions

View file

@ -373,9 +373,26 @@ angular.module('copayApp.services')
root.profile.credentials.push(JSON.parse(walletClient.export()));
root.setWalletClients();
root.setAndStoreFocus(walletId, function() {
storageService.storeProfile(root.profile, function(err) {
return cb(err, walletId);
var handleImport = function(cb) {
var isImport = opts.mnemonic || opts.externalSource || opts.extendedPrivateKey;
if (!isImport)
return cb();
$rootScope.$emit('Local/BackupDone', walletId);
if (!walletClient.isComplete())
return cb();
storageService.setCleanAndScanAddresses(walletId, cb);
};
handleImport(function() {
root.setAndStoreFocus(walletId, function() {
storageService.storeProfile(root.profile, function(err) {
return cb(err, walletId);
});
});
});
});