From d74f8697f72ddec2b792a822a18bda43f4ccc9b6 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 29 Dec 2023 17:25:30 +0000 Subject: check tx type --- routes/payments.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/routes/payments.js b/routes/payments.js index 86ff6578..99ec91e6 100644 --- a/routes/payments.js +++ b/routes/payments.js @@ -243,8 +243,12 @@ export default { }, async confirm({ body: { txid, wallet, type } }, res) { - let node = type === types.bitcoin ? bc : lq; try { + let node; + if (type === types.bitcoin) node = bc; + else if (type === types.liquid) node = lq; + else fail("unrecognized transaction type"); + if (wallet === config.bitcoin.wallet) { let { confirmations, details } = await node.getTransaction(txid); for (let { address, amount, asset, category, vout } of details) { -- cgit v1.2.3