aboutsummaryrefslogtreecommitdiffstats
path: root/routes/bitcoin
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-10-01 16:40:38 -0700
committerAdam Soltys <[email protected]>2022-10-01 16:40:38 -0700
commitb5e85cde1015c2ffd5b25dec8f281089ff12b8d8 (patch)
tree9552d1f7d00f2056a34c2647719ec2c4091163e9 /routes/bitcoin
parent5d51b1aded7ee2214c2c49e67f78ca6cef678f78 (diff)
parent4e58ebca11ca68bfe08e3187e6cf13c01982bd4f (diff)
downloadcoinos-server-b5e85cde1015c2ffd5b25dec8f281089ff12b8d8.tar.gz
coinos-server-b5e85cde1015c2ffd5b25dec8f281089ff12b8d8.zip
Merge branch 'master' into prod
Diffstat (limited to 'routes/bitcoin')
-rw-r--r--routes/bitcoin/receive.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/routes/bitcoin/receive.js b/routes/bitcoin/receive.js
index 7451e868..3bc1750d 100644
--- a/routes/bitcoin/receive.js
+++ b/routes/bitcoin/receive.js
@@ -213,12 +213,13 @@ setInterval(async () => {
if (p && p.user) user = p.user;
if (p && p.account) {
- ({ account } = p);
+ ({ account, invoice } = p);
total = p.amount + p.tip;
p.confirmed = 1;
await account.save({ transaction });
+ await invoice.increment({ received: total }, { transaction });
await account.increment({ balance: total }, { transaction });
await account.decrement(
{ pending: Math.min(account.pending, total) },