Skip to content

Commit

Permalink
Merge pull request #171 from getAlby/fix/get-info-fallback
Browse files Browse the repository at this point in the history
fix: get info fallback
  • Loading branch information
bumi authored Dec 20, 2023
2 parents 0a8282e + 9cc3af9 commit d60a958
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/webln/NostrWeblnProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,10 @@ export class NostrWebLNProvider implements WebLNProvider, Nip07Provider {
const version = "Alby JS SDK";

try {
return this.executeNip47Request<GetInfoResponse, Nip47GetInfoResponse>(
const result = await this.executeNip47Request<
GetInfoResponse,
Nip47GetInfoResponse
>(
"get_info",
undefined,
(result) => !!result.methods,
Expand All @@ -297,6 +300,7 @@ export class NostrWebLNProvider implements WebLNProvider, Nip07Provider {
version,
}),
);
return result;
} catch (error) {
console.error("Failed to request get_info", error);
return {
Expand Down

0 comments on commit d60a958

Please sign in to comment.