diff options
| -rw-r--r-- | routes/liquid/receive.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/routes/liquid/receive.js b/routes/liquid/receive.js index 325e6783..49c95712 100644 --- a/routes/liquid/receive.js +++ b/routes/liquid/receive.js @@ -17,7 +17,11 @@ const getAccount = async (params, pending) => { where: params }); - if (account) return account; + + if (account) { + l.info("found account", params, account.asset, account.id); + return account; + } let { asset } = params; let name = asset.substr(0, 6); @@ -33,12 +37,14 @@ const getAccount = async (params, pending) => { const existing = await db.Account.findOne({ where: { asset, + pubkey, }, order: [["id", "ASC"]], limit: 1, }); if (existing) { + l.info("existing", existing.id); ({ domain, ticker, precision, name } = existing); } } @@ -101,7 +107,7 @@ zmqRawTx.on("message", async (topic, message, sequence) => { account.pending += value; await account.save(); } else { - if (!account) account = await getAccount( + account = await getAccount( { user_id: user.id, asset, |
