From d4bdd2e4bdfaeed38fb6007b337b32d494b3997c Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 18 Aug 2021 15:44:24 -0400 Subject: check for lightning message --- lib/send.js | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/send.js') diff --git a/lib/send.js b/lib/send.js index 92b2eda3..293473d9 100644 --- a/lib/send.js +++ b/lib/send.js @@ -59,6 +59,7 @@ send = async (amount, memo, hash, user) => { fee_limit: { fixed: Math.min(10000, account.balance) }, }); + if (!m) throw new Error("lightning payment failed"); if (m.payment_error) throw new Error(m.payment_error); ({ -- cgit v1.2.3