Get accountPubkey correctly
This commit is contained in:
parent
2b4886615d
commit
7e16d35f05
|
@ -26,7 +26,7 @@ export const NostrProvider: React.FC<NostrProviderProps> = ({ children }) => {
|
|||
const [isRelayOpen, setIsRelayOpen] = useState(false);
|
||||
|
||||
const url = instance.nostr?.relay;
|
||||
const accountPubkey = useAppSelector((state) => state.meta.pubkey ?? state.me);
|
||||
const accountPubkey = useAppSelector(({ meta, auth }) => meta.pubkey ?? auth.users.get(auth.me!)?.id);
|
||||
|
||||
const signer = useMemo(
|
||||
() => accountPubkey ? NKeys.get(accountPubkey) ?? window.nostr : undefined,
|
||||
|
|
Loading…
Reference in New Issue