check extended private key at import
This commit is contained in:
parent
696c5bbd18
commit
18a2577523
1 changed files with 7 additions and 2 deletions
|
|
@ -134,8 +134,7 @@ angular.module('copayApp.services')
|
|||
|
||||
if (n.type == "NewBlock" && n.data.network == "testnet") {
|
||||
throttledBwsEvent(n, wallet);
|
||||
}
|
||||
else newBwsEvent(n, wallet);
|
||||
} else newBwsEvent(n, wallet);
|
||||
});
|
||||
|
||||
wallet.on('walletCompleted', function() {
|
||||
|
|
@ -600,6 +599,7 @@ angular.module('copayApp.services')
|
|||
var walletClient = bwcService.getClient(null, opts);
|
||||
|
||||
$log.debug('Importing Wallet:', opts);
|
||||
|
||||
try {
|
||||
walletClient.import(str, {
|
||||
compressed: opts.compressed,
|
||||
|
|
@ -611,6 +611,11 @@ angular.module('copayApp.services')
|
|||
|
||||
str = JSON.parse(str);
|
||||
|
||||
if (str.xPrivKey) {
|
||||
delete str.xPrivKeyEncrypted;
|
||||
delete str.mnemonicEncrypted;
|
||||
}
|
||||
|
||||
var addressBook = str.addressBook || {};
|
||||
|
||||
addAndBindWalletClient(walletClient, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue