Browse Source
Merge pull request #401 from mrfelton/fix/wallet-unlock-password
fix(passwords): convert password to Buffer
renovate/lint-staged-8.x
JimmyMow
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
app/lnd/methods/walletController.js
|
|
@ -112,7 +112,7 @@ export function genSeed(walletUnlocker) { |
|
|
|
*/ |
|
|
|
export function unlockWallet(walletUnlocker, { wallet_password }) { |
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
walletUnlocker.unlockWallet({ wallet_password }, (err, data) => { |
|
|
|
walletUnlocker.unlockWallet({ wallet_password: Buffer.from(wallet_password) }, (err, data) => { |
|
|
|
if (err) { reject(err) } |
|
|
|
|
|
|
|
resolve(data) |
|
|
@ -128,7 +128,7 @@ export function unlockWallet(walletUnlocker, { wallet_password }) { |
|
|
|
export function initWallet(walletUnlocker, { wallet_password, cipher_seed_mnemonic, aezeed_passphrase }) { |
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
walletUnlocker.initWallet({ |
|
|
|
wallet_password, |
|
|
|
wallet_password: Buffer.from(wallet_password), |
|
|
|
cipher_seed_mnemonic, |
|
|
|
aezeed_passphrase: Buffer.from(aezeed_passphrase, 'hex'), |
|
|
|
recovery_window: 250 |
|
|
|