fix build error

This commit is contained in:
ennmichael
2023-04-17 22:07:54 +02:00
parent d754551ebb
commit 1e5811b117
3 changed files with 10 additions and 24 deletions

View File

@ -145,8 +145,8 @@ export default function LoginPage() {
}
async function doNip07Login() {
const relays = "getRelays" in window.nostr ? await window.nostr.getRelays() : undefined;
const pubKey = await window.nostr.getPublicKey();
const relays = "getRelays" in unwrap(window.nostr) ? await unwrap(window.nostr?.getRelays)() : undefined;
const pubKey = await unwrap(window.nostr).getPublicKey();
LoginStore.loginWithPubkey(pubKey, relays);
}