check extended private key at import

This commit is contained in:
Javier 2016-10-12 18:42:30 -03:00
commit 18a2577523

View file

@ -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, {