diff options
| -rw-r--r-- | routes/payments.js | 6 |
1 files changed, 5 insertions, 1 deletions
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) { |
