aboutsummaryrefslogtreecommitdiffstats
path: root/routes/bitcoin
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2020-05-13 20:15:48 -0700
committerAdam Soltys <[email protected]>2020-05-13 20:45:16 -0700
commit25e8391aed541627e2aa2e3540c065f90b96c982 (patch)
tree2afe9ee088c5f3a130a0dbab7cb5174d9ed30fb1 /routes/bitcoin
parent79f6650b295ca1ae6f3ab337f8efd6d24eef38f1 (diff)
downloadcoinos-server-25e8391aed541627e2aa2e3540c065f90b96c982.tar.gz
coinos-server-25e8391aed541627e2aa2e3540c065f90b96c982.zip
unlock wallet on address generation to prevent keypool depletion
Diffstat (limited to 'routes/bitcoin')
-rw-r--r--routes/bitcoin/receive.js3
1 files changed, 3 insertions, 0 deletions
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();