add scan after create/join with mnemonics

This commit is contained in:
Matias Alejo Garcia 2015-09-02 17:11:59 -03:00
commit 142a6bd03a
6 changed files with 76 additions and 10 deletions

View file

@ -87,7 +87,7 @@ angular.module('copayApp.controllers').controller('createController',
this._create = function (opts) {
$timeout(function() {
profileService.createWallet(opts, function(err, secret) {
profileService.createWallet(opts, function(err, secret, walletId) {
self.loading = false;
if (err) {
if (err == "Error creating wallet" && opts.extendedPublicKey) {
@ -100,7 +100,11 @@ angular.module('copayApp.controllers').controller('createController',
});
}
else {
go.walletHome();
if (opts.mnemonic && opts.n==1) {
$rootScope.$emit('Local/WalletImported', walletId);
} else {
go.walletHome();
}
}
});
}, 100);