From a51c5f61b3ac4ff6f497eea8465a70b69b70e819 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 1 May 2021 02:44:17 -0700 Subject: limit lightning fees to account balance or 10000 sats --- lib/send.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/send.js b/lib/send.js index 12c3f5aa..660fcae4 100644 --- a/lib/send.js +++ b/lib/send.js @@ -56,7 +56,7 @@ send = async (amount, memo, hash, user) => { amt: amount, payment_request: hash, max_parts: 10, - fee_limit: { fixed: 1000 }, + fee_limit: { fixed: Math.min(10000, account.balance) }, }); if (m.payment_error) throw new Error(m.payment_error); -- cgit v1.2.3