kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
(hopefully) fix multiple accounts issue
rodzic
af9bb284fa
commit
c073278167
|
@ -27,6 +27,8 @@ function logInNostr(pubkey: string) {
|
|||
secret,
|
||||
}));
|
||||
|
||||
dispatch(setNostrPubkey(undefined));
|
||||
|
||||
const { access_token } = dispatch(authLoggedIn(token));
|
||||
return await dispatch(verifyCredentials(access_token as string));
|
||||
};
|
||||
|
@ -43,7 +45,7 @@ function nostrExtensionLogIn() {
|
|||
};
|
||||
}
|
||||
|
||||
function setNostrPubkey(pubkey: string) {
|
||||
function setNostrPubkey(pubkey: string | undefined) {
|
||||
return {
|
||||
type: NOSTR_PUBKEY_SET,
|
||||
pubkey,
|
||||
|
|
|
@ -28,7 +28,7 @@ export const NostrProvider: React.FC<NostrProviderProps> = ({ children }) => {
|
|||
const { account } = useOwnAccount();
|
||||
|
||||
const url = instance.nostr?.relay;
|
||||
const accountPubkey = useAppSelector((state) => account?.nostr.pubkey ?? state.meta.pubkey);
|
||||
const accountPubkey = useAppSelector((state) => state.meta.pubkey ?? account?.nostr.pubkey);
|
||||
|
||||
const signer = useMemo(
|
||||
() => (accountPubkey ? NKeys.get(accountPubkey) : undefined) ?? window.nostr,
|
||||
|
|
Ładowanie…
Reference in New Issue