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
parent
commit
4c20554663
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      app/lnd/methods/walletController.js

4
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

Loading…
Cancel
Save