From 07b334bd86ccae7771c80587988351d2de88b894 Mon Sep 17 00:00:00 2001 From: Michael Bumann Date: Sat, 24 Feb 2024 10:44:54 +0100 Subject: [PATCH] feat: add support for sendPaymentAsync to NWC WebLN provider --- src/webln/NostrWeblnProvider.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/webln/NostrWeblnProvider.ts b/src/webln/NostrWeblnProvider.ts index afe4dd3..a062ee1 100644 --- a/src/webln/NostrWeblnProvider.ts +++ b/src/webln/NostrWeblnProvider.ts @@ -298,6 +298,17 @@ export class NostrWebLNProvider implements WebLNProvider, Nip07Provider { return result; } + async sendPaymentAsync(invoice: string): Promise> { + await this.checkEnabled(); + + // don't wait for the response' + this.client.payInvoice({ invoice }); + + this.notify("sendPaymentAsync", {}); + + return {}; + } + async keysend(args: KeysendArgs): Promise { await this.checkEnabled();