diff options
| author | Adam Soltys <[email protected]> | 2021-05-21 14:05:02 -0400 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2021-05-21 14:05:02 -0400 |
| commit | 3ce9c73b1d4a281fe1475206d49c4f436e0b992e (patch) | |
| tree | 8e8324d74761f164d9615a068a0f4f840506e642 /routes/bitcoin | |
| parent | 37412d24f5c7b0c6d316ce240ef29cd4ccd2ca6d (diff) | |
| download | coinos-server-3ce9c73b1d4a281fe1475206d49c4f436e0b992e.tar.gz coinos-server-3ce9c73b1d4a281fe1475206d49c4f436e0b992e.zip | |
persist liquid conversion requests
Diffstat (limited to 'routes/bitcoin')
| -rw-r--r-- | routes/bitcoin/receive.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/routes/bitcoin/receive.js b/routes/bitcoin/receive.js index e381ccda..1784fd5f 100644 --- a/routes/bitcoin/receive.js +++ b/routes/bitcoin/receive.js @@ -154,9 +154,11 @@ setInterval(async () => { transaction }); - ({ account, address, user } = p); + + ({ address, user } = p); if (p && p.account) { + ({ account } = p); total = p.amount + p.tip; p.confirmed = 1; @@ -179,21 +181,18 @@ setInterval(async () => { } else { l.warn("couldn't find payment", hash); } - - delete queue[hash]; }); let c = convert[address]; if (c) { - let { tx } = c; user.account = account; delete queue[hash]; await sendLiquid({ - address, + address: c.address, + amount: total - 100, user, - tx, limit: total }); } |
