aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/payments.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/payments.js b/lib/payments.js
index 03085280..a754dc93 100644
--- a/lib/payments.js
+++ b/lib/payments.js
@@ -593,6 +593,7 @@ export let build = async ({ amount, address, feeRate, user, subtract }) => {
let node = getNode(type);
amount = parseInt(amount);
+ if (amount < 0) fail("invalid amount");
let fees = await fetch(`${api[type]}/fees/recommended`).then((r) => r.json());