From b9d97f36faab52bd236759a9febe684fbdded385 Mon Sep 17 00:00:00 2001 From: escapedcat Date: Thu, 8 Dec 2022 16:20:10 +0100 Subject: [PATCH] fix: nostr getPublicKey #1051 --- .../background-script/actions/nostr/getPublicKeyOrPrompt.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/extension/background-script/actions/nostr/getPublicKeyOrPrompt.ts b/src/extension/background-script/actions/nostr/getPublicKeyOrPrompt.ts index 9abebc5bb7..07dd116e6a 100644 --- a/src/extension/background-script/actions/nostr/getPublicKeyOrPrompt.ts +++ b/src/extension/background-script/actions/nostr/getPublicKeyOrPrompt.ts @@ -18,7 +18,7 @@ const getPublicKeyOrPrompt = async (message: MessagePublicKeyGet) => { ); if (hasPermission) { - const publicKey = state.getState().getNostr().getPublicKey(); + const publicKey = await state.getState().getNostr().getPublicKey(); return { data: publicKey }; } else { const promptResponse = await utils.openPrompt<{ @@ -39,7 +39,7 @@ const getPublicKeyOrPrompt = async (message: MessagePublicKeyGet) => { if (promptResponse.data.confirm) { // Normally `openPrompt` would throw already, but to make sure we got a confirm from the user we check this here - const publicKey = state.getState().getNostr().getPublicKey(); + const publicKey = await state.getState().getNostr().getPublicKey(); return { data: publicKey }; } else { return { error: "User rejected" };