From 876ca8bc71f69f2399715dc7f54caae888dddfac Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 9 Nov 2022 09:54:11 -0800 Subject: reload after increment --- routes/bitcoin/receive.js | 5 +++-- 1 file 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); -- cgit v1.2.3