Skip to content

Commit

Permalink
Merge pull request #207 from getAlby/feat/sendPaymentAsync
Browse files Browse the repository at this point in the history
feat: add support for sendPaymentAsync to NWC WebLN provider
  • Loading branch information
rolznz authored Feb 29, 2024
2 parents 30fc479 + 07b334b commit f697e10
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 f697e10

Please sign in to comment.