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

@ -153,6 +153,8 @@ angular.module('copayApp.controllers').controller('joinController',
var opts = {
secret: form.secret.$modelValue,
mnemonic: form.privateKey.$modelValue,
myName: form.myName.$modelValue
extendedPrivateKey: form.privateKey.$modelValue,
myName: form.myName.$modelValue
}
@ -189,7 +191,12 @@ angular.module('copayApp.controllers').controller('joinController',
return
}
$timeout(function() {
go.walletHome();
var fc = profileService.focusedClient;
if (opts.mnemonic && fc.isComplete()) {
$rootScope.$emit('Local/WalletImported', fc.credentials.walletId);
} else {
go.walletHome();
}
}, 2000);
});
}, 100);