Skip to content

Commit

Permalink
refactor(nostr): use await #1727
Browse files Browse the repository at this point in the history
  • Loading branch information
escapedcat committed Nov 25, 2022
1 parent 8b06d2f commit d2dde89
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/extension/ln/nostr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ export default class NostrProvider {
nip04 = new Nip04(this);

private async enable() {
return this.execute<{
return await this.execute<{
enabled: boolean;
remember: boolean;
}>("enable").then((result) => {
return result;
});
}>("enable");
}

async getPublicKey(): Promise<string> {
Expand All @@ -18,7 +16,6 @@ export default class NostrProvider {

async signEvent(event: Event): Promise<Event | boolean> {
await this.enable();

return this.execute("signEventOrPrompt", { event });
}

Expand Down

0 comments on commit d2dde89

Please sign in to comment.