Merge pull request #4587 from JDonadio/feat/unlock-wallet

Unlock wallet at import
This commit is contained in:
Javier Donadío 2016-07-13 11:20:41 -03:00 committed by GitHub
commit 608bb9b4b8
1 changed files with 8 additions and 0 deletions

View File

@ -560,6 +560,14 @@ angular.module('copayApp.services')
return cb(gettext('Could not import. Check input file and spending password'));
}
if (walletClient.hasPrivKeyEncrypted()) {
try {
walletClient.disablePrivateKeyEncryption();
} catch (e) {
$log.warn(e);
}
}
str = JSON.parse(str);
var addressBook = str.addressBook || {};