diff options
| author | Adam Soltys <[email protected]> | 2020-05-13 20:15:48 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2020-05-13 20:45:16 -0700 |
| commit | 25e8391aed541627e2aa2e3540c065f90b96c982 (patch) | |
| tree | 2afe9ee088c5f3a130a0dbab7cb5174d9ed30fb1 /routes/bitcoin | |
| parent | 79f6650b295ca1ae6f3ab337f8efd6d24eef38f1 (diff) | |
| download | coinos-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.js | 3 |
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(); |
