unlock wallet at import

This commit is contained in:
Javier 2016-07-13 10:43:50 -03:00
parent 51660a09ab
commit 4bc55a8fde
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 || {};