diff options
| author | Adam Soltys <[email protected]> | 2021-03-19 14:37:20 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2021-03-19 14:37:22 -0700 |
| commit | 70c8455d9920755b1b925046d46c486a313944c9 (patch) | |
| tree | 4abd9282fcbe9dda76b8e88682262209b5269850 /routes/bitcoin | |
| parent | b4606c0604eada8cdbd372c33f5faa39912b88d9 (diff) | |
| download | coinos-server-70c8455d9920755b1b925046d46c486a313944c9.tar.gz coinos-server-70c8455d9920755b1b925046d46c486a313944c9.zip | |
check conversion limit
Diffstat (limited to 'routes/bitcoin')
| -rw-r--r-- | routes/bitcoin/receive.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/routes/bitcoin/receive.js b/routes/bitcoin/receive.js index ccaabc06..e381ccda 100644 --- a/routes/bitcoin/receive.js +++ b/routes/bitcoin/receive.js @@ -136,7 +136,7 @@ setInterval(async () => { for (let i = 0; i < arr.length; i++) { const hash = arr[i]; - let account, address, user; + let account, address, user, total; await db.transaction(async transaction => { let p = await db.Payment.findOne({ where: { hash, confirmed: 0, received: 1 }, @@ -157,7 +157,7 @@ setInterval(async () => { ({ account, address, user } = p); if (p && p.account) { - let total = p.amount + p.tip; + total = p.amount + p.tip; p.confirmed = 1; await account.save({ transaction }); @@ -193,7 +193,8 @@ setInterval(async () => { await sendLiquid({ address, user, - tx + tx, + limit: total }); } } |
