mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-04-12 21:59:16 +02:00
set relays before pubkey
This commit is contained in:
parent
4413b3588c
commit
a873d6fdb7
@ -42,17 +42,18 @@ class IdentityService {
|
||||
if (window.nostr) {
|
||||
this.loading.next(true);
|
||||
const pubkey = await window.nostr.getPublicKey();
|
||||
settings.identity.next({
|
||||
pubkey,
|
||||
useExtension: true,
|
||||
});
|
||||
|
||||
const relays = await window.nostr.getRelays();
|
||||
|
||||
if (Array.isArray(relays)) {
|
||||
this.relays.next(relays.reduce<PresetRelays>((d, r) => ({ ...d, [r]: { read: true, write: true } }), {}));
|
||||
} else {
|
||||
this.relays.next(relays);
|
||||
}
|
||||
|
||||
settings.identity.next({
|
||||
pubkey,
|
||||
useExtension: true,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user