refactor scan after importing a wallet
This commit is contained in:
parent
e9e8c6a0cb
commit
8c18995ae0
4 changed files with 25 additions and 20 deletions
|
|
@ -170,11 +170,6 @@ angular.module('copayApp.controllers').controller('createController',
|
|||
return;
|
||||
}
|
||||
|
||||
if (opts.mnemonic || opts.externalSource || opts.extendedPrivateKey) {
|
||||
if (opts.n == 1) {
|
||||
$rootScope.$emit('Local/WalletImported', walletId);
|
||||
}
|
||||
}
|
||||
});
|
||||
}, 100);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -923,9 +923,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
}
|
||||
|
||||
profileService.setWalletClients();
|
||||
$timeout(function() {
|
||||
$rootScope.$emit('Local/WalletImported', self.walletId);
|
||||
}, 100);
|
||||
self.startScan(self.walletId);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -1176,10 +1174,10 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
self.debouncedUpdate();
|
||||
});
|
||||
|
||||
$rootScope.$on('Local/BackupDone', function(event) {
|
||||
$rootScope.$on('Local/BackupDone', function(event, walletId) {
|
||||
self.needsBackup = false;
|
||||
$log.debug('Backup done');
|
||||
storageService.setBackupFlag(self.walletId, function(err) {
|
||||
storageService.setBackupFlag(walletId || self.walletId, function(err) {
|
||||
$log.debug('Backup done stored');
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -129,11 +129,6 @@ angular.module('copayApp.controllers').controller('joinController',
|
|||
return;
|
||||
}
|
||||
|
||||
$timeout(function() {
|
||||
var fc = profileService.focusedClient;
|
||||
if (fc.isComplete() && (opts.mnemonic || opts.externalSource || opts.extendedPrivateKey))
|
||||
$rootScope.$emit('Local/WalletImported', fc.credentials.walletId);
|
||||
}, 2000);
|
||||
});
|
||||
}, 100);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue