Skip to content

Commit

Permalink
feat: add support for sendPaymentAsync to NWC WebLN provider
Browse files Browse the repository at this point in the history
  • Loading branch information
bumi committed Feb 24, 2024
1 parent 30fc479 commit 07b334b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/webln/NostrWeblnProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,17 @@ export class NostrWebLNProvider implements WebLNProvider, Nip07Provider {
return result;
}

async sendPaymentAsync(invoice: string): Promise<Record<string, never>> {
await this.checkEnabled();

// don't wait for the response'
this.client.payInvoice({ invoice });

this.notify("sendPaymentAsync", {});

return {};
}

async keysend(args: KeysendArgs): Promise<SendPaymentResponse> {
await this.checkEnabled();

Expand Down

0 comments on commit 07b334b

Please sign in to comment.