From 25e8391aed541627e2aa2e3540c065f90b96c982 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 13 May 2020 20:15:48 -0700 Subject: unlock wallet on address generation to prevent keypool depletion --- routes/bitcoin/receive.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'routes/bitcoin') diff --git a/routes/bitcoin/receive.js b/routes/bitcoin/receive.js index 1aae1467..9b01fc6a 100644 --- a/routes/bitcoin/receive.js +++ b/routes/bitcoin/receive.js @@ -68,6 +68,9 @@ zmqRawTx.on("message", async (topic, message, sequence) => { account.pending += value; await account.save(); + if (config.bitcoin.walletpass) + await bc.walletPassphrase(config.bitcoin.walletpass, 300); + user.address = await bc.getNewAddress("", "bech32"); await user.save(); -- cgit v1.2.3