mirror of
https://github.com/edufeed-org/polloer.git
synced 2025-12-07 23:34:31 +00:00
Wait for user when using extension
This commit is contained in:
parent
2b5833fcff
commit
ec4fe19d35
1 changed files with 1 additions and 1 deletions
|
|
@ -5,11 +5,11 @@ import { get } from 'svelte/store';
|
||||||
export async function login() {
|
export async function login() {
|
||||||
if (window.nostr) {
|
if (window.nostr) {
|
||||||
const signer = new NDKNip07Signer();
|
const signer = new NDKNip07Signer();
|
||||||
|
await signer.user();
|
||||||
ndk.update((ndk) => {
|
ndk.update((ndk) => {
|
||||||
ndk.signer = signer;
|
ndk.signer = signer;
|
||||||
return ndk;
|
return ndk;
|
||||||
});
|
});
|
||||||
signer.user();
|
|
||||||
} else {
|
} else {
|
||||||
console.log('no extension');
|
console.log('no extension');
|
||||||
const storedPrivateKey = window.localStorage.getItem('nostrPrivateKey');
|
const storedPrivateKey = window.localStorage.getItem('nostrPrivateKey');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue