diff options
| author | Adam Soltys <[email protected]> | 2024-01-19 10:20:52 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-01-19 10:20:52 -0800 |
| commit | 6b0f7dff1ba247d958405dc01d31e1d079858a52 (patch) | |
| tree | 229f2e871d41ce339e28f9f1bedb583bdf7b46c0 | |
| parent | a9537167390ebbcd2fd2f218b62b67586a85520d (diff) | |
| download | coinos-server-6b0f7dff1ba247d958405dc01d31e1d079858a52.tar.gz coinos-server-6b0f7dff1ba247d958405dc01d31e1d079858a52.zip | |
fix error message
| -rw-r--r-- | lib/payments.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/payments.js b/lib/payments.js index e9f634e2..796ad18b 100644 --- a/lib/payments.js +++ b/lib/payments.js @@ -383,7 +383,7 @@ export let build = async ({ amount, address, feeRate }, user) => { let balance = await g(`balance:${user.id}`); if (amount + fee + ourfee > balance) { - if (amount <= fee + ourfee + dust) fail(`insufficient funds ⚡️${amount} of ⚡️${fee + ourfee + dust}`); + if (amount <= fee + ourfee + dust) fail(`insufficient funds ⚡️${balance} of ⚡️${amount + fee + ourfee + dust}`); outs = [{ [address]: btc(amount - ourfee) }]; raw = await node.createRawTransaction([], outs, 0, replaceable); |
