refactor ledger signature, restrict ledger to m-n, n>1

This commit is contained in:
Matias Alejo Garcia 2015-09-14 09:46:45 -03:00
commit 7d4fee4aef
7 changed files with 61 additions and 105 deletions

View file

@ -100,21 +100,21 @@ angular.module('copayApp.controllers').controller('createController',
profileService.createWallet(opts, function(err, secret, walletId) {
self.loading = false;
if (err) {
if (err == "Error creating wallet" && opts.extendedPublicKey) {
err = gettext("This xpub index is already used by another wallet. Please select another index.");
}
$log.warn(err);
self.error = err;
$timeout(function() {
$rootScope.$apply();
});
} else {
if (opts.n == 1 && (opts.mnemonic || opts.externalSource || opts.extendedPrivateKey)) {
return;
}
if (opts.mnemonic || opts.externalSource || opts.extendedPrivateKey) {
if (opts.n == 1) {
$rootScope.$emit('Local/WalletImported', walletId);
} else {
go.walletHome();
$rootScope.$emit('Local/BackupDone', walletId);
}
}
go.walletHome();
});
}, 100);
}