mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-09-25 19:23:45 +02:00
set relays before pubkey
This commit is contained in:
@@ -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,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user