Skip to content

Commit 9cc3af9

Browse files
committed
fix: get info fallback
executeNip47Request was not awaited so the try/catch was ignored
1 parent 0a8282e commit 9cc3af9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/webln/NostrWeblnProvider.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,10 @@ export class NostrWebLNProvider implements WebLNProvider, Nip07Provider {
277277
const version = "Alby JS SDK";
278278

279279
try {
280-
return this.executeNip47Request<GetInfoResponse, Nip47GetInfoResponse>(
280+
const result = await this.executeNip47Request<
281+
GetInfoResponse,
282+
Nip47GetInfoResponse
283+
>(
281284
"get_info",
282285
undefined,
283286
(result) => !!result.methods,
@@ -297,6 +300,7 @@ export class NostrWebLNProvider implements WebLNProvider, Nip07Provider {
297300
version,
298301
}),
299302
);
303+
return result;
300304
} catch (error) {
301305
console.error("Failed to request get_info", error);
302306
return {

0 commit comments

Comments
 (0)