aboutsummaryrefslogtreecommitdiffstats
path: root/lib/payments.ts
diff options
context:
space:
mode:
Diffstat (limited to 'lib/payments.ts')
-rw-r--r--lib/payments.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/payments.ts b/lib/payments.ts
index 3a02bfda..60989924 100644
--- a/lib/payments.ts
+++ b/lib/payments.ts
@@ -502,7 +502,8 @@ export let sendLightning = async ({
}
let total = amount;
- let { amount_msat } = await ln.decode(pr);
+ let decoded = await ln.decode(pr);
+ let { amount_msat } = decoded;
if (amount_msat) total = Math.round(amount_msat / 1000);
maxfee = parseInt(maxfee) || getMaxFee(total);