aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-11-09 09:54:11 -0800
committerAdam Soltys <[email protected]>2022-11-09 09:54:11 -0800
commit876ca8bc71f69f2399715dc7f54caae888dddfac (patch)
tree8e713c0d1d0bf125824e19d717eea506fb15c76e
parent6e01839215445a6af4829642e6365275cbfdaba5 (diff)
downloadcoinos-server-876ca8bc71f69f2399715dc7f54caae888dddfac.tar.gz
coinos-server-876ca8bc71f69f2399715dc7f54caae888dddfac.zip
reload after increment
-rw-r--r--routes/bitcoin/receive.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/routes/bitcoin/receive.js b/routes/bitcoin/receive.js
index 4ace1c2f..10193ceb 100644
--- a/routes/bitcoin/receive.js
+++ b/routes/bitcoin/receive.js
@@ -104,9 +104,10 @@ zmqRawTx.on("message", async (topic, message, sequence) => {
}
await invoice.increment({ pending: value }, { transaction });
- await invoice.save({ transaction });
+ await invoice.reload({ transaction });
+
await account.increment({ pending: value }, { transaction });
- await account.save({ transaction });
+ await account.reload({ transaction });
if (config.bitcoin.walletpass)
await bc.walletPassphrase(config.bitcoin.walletpass, 300);