From fe0455ffe2d93eda5792ec1ef38348ef24aba2aa Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 1 Feb 2023 19:58:13 +0000 Subject: preserve user id --- lib/invoices.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/invoices.js b/lib/invoices.js index 814e87d9..4a09f44b 100644 --- a/lib/invoices.js +++ b/lib/invoices.js @@ -12,7 +12,7 @@ import ln from "$lib/ln"; export let generate = async ({ invoice, user, sender }) => { let { currency, tip, amount, rate, request_id, type } = invoice; - amount = parseInt(amount); + amount = parseInt(amount || 0); tip = parseInt(tip || 0); if (amount < 0) fail("amount out of range"); -- cgit v1.2.3