aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/payments.js2
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);