fix key control
This commit is contained in:
parent
ff40906a3c
commit
e960e17079
1 changed files with 14 additions and 13 deletions
|
|
@ -10,9 +10,9 @@ angular.module('copayApp.controllers').controller('paperWalletController',
|
|||
|
||||
self.createTx = function(privateKey, passphrase) {
|
||||
if (privateKey.charAt(0) != 6) {
|
||||
var isValidPrivateKey = self.checkPrivateKey(privateKey);
|
||||
var isValidKey = self.checkPrivateKey(privateKey);
|
||||
|
||||
if (isValidPrivateKey != true) return self.error = isValidPrivateKey;
|
||||
if (!isValidKey) return;
|
||||
}
|
||||
|
||||
self.error = null;
|
||||
|
|
@ -39,7 +39,8 @@ angular.module('copayApp.controllers').controller('paperWalletController',
|
|||
try {
|
||||
new bitcore.PrivateKey(privateKey, 'livenet');
|
||||
} catch (err) {
|
||||
return err.toString();
|
||||
self.error = err.toString();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue