From f532d31ae4c0cbc67388324cf028f64814774971 Mon Sep 17 00:00:00 2001 From: Michael Bumann Date: Thu, 22 Dec 2022 14:17:02 +0100 Subject: [PATCH] chore: always prompt for zero amount invoices we don't fully support zero amounts yet, but we should prompt --- .../background-script/actions/webln/sendPaymentOrPrompt.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/extension/background-script/actions/webln/sendPaymentOrPrompt.ts b/src/extension/background-script/actions/webln/sendPaymentOrPrompt.ts index fabf27e97b..09ff06a160 100644 --- a/src/extension/background-script/actions/webln/sendPaymentOrPrompt.ts +++ b/src/extension/background-script/actions/webln/sendPaymentOrPrompt.ts @@ -29,6 +29,10 @@ const sendPaymentOrPrompt = async (message: Message) => { }; async function checkAllowance(host: string, amount: number) { + // if it is a 0 amount invoice we return false and prompt + if (amount <= 0) { + return false; + } const allowance = await db.allowances .where("host") .equalsIgnoreCase(host)