Skip to content

Commit

Permalink
Merge branch 'ref/decrypt-bip38' of github.com:gabrielbazan7/bitcore
Browse files Browse the repository at this point in the history
  • Loading branch information
kajoseph committed Mar 8, 2024
2 parents 0476a3d + ac75354 commit e3ce643
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/bitcore-wallet-client/src/lib/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -418,13 +418,13 @@ export class API extends EventEmitter {
return this.fromObj(c);
}

decryptBIP38PrivateKey(encryptedPrivateKeyBase58, passphrase, opts, cb) {
decryptBIP38PrivateKey(encryptedPrivateKeyBase58, passphrase, progressCallback, cb) {
var Bip38 = require('bip38');
var bip38 = new Bip38();

var privateKeyWif;
try {
privateKeyWif = bip38.decrypt(encryptedPrivateKeyBase58, passphrase);
privateKeyWif = bip38.decrypt(encryptedPrivateKeyBase58, passphrase, progressCallback);
} catch (ex) {
return cb(new Error('Could not decrypt BIP38 private key' + ex));
}
Expand Down

0 comments on commit e3ce643

Please sign in to comment.