kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Merge remote-tracking branch 'origin/main' into nostr-onboarding
commit
1683cdbfb7
|
@ -32,6 +32,8 @@ function logInNostr(pubkey: string, onboard = false) {
|
||||||
dispatch(startOnboarding());
|
dispatch(startOnboarding());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dispatch(setNostrPubkey(undefined));
|
||||||
|
|
||||||
const { access_token } = dispatch(authLoggedIn(token));
|
const { access_token } = dispatch(authLoggedIn(token));
|
||||||
return await dispatch(verifyCredentials(access_token as string));
|
return await dispatch(verifyCredentials(access_token as string));
|
||||||
};
|
};
|
||||||
|
@ -48,7 +50,7 @@ function nostrExtensionLogIn() {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function setNostrPubkey(pubkey: string) {
|
function setNostrPubkey(pubkey: string | undefined) {
|
||||||
return {
|
return {
|
||||||
type: NOSTR_PUBKEY_SET,
|
type: NOSTR_PUBKEY_SET,
|
||||||
pubkey,
|
pubkey,
|
||||||
|
|
|
@ -430,7 +430,7 @@ const StatusActionBar: React.FC<IStatusActionBar> = ({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (features.federating && !account.local) {
|
if (features.federating && (status.ditto?.get('external_url') || !account.local)) {
|
||||||
const externalNostrUrl: string | undefined = status.ditto?.get('external_url');
|
const externalNostrUrl: string | undefined = status.ditto?.get('external_url');
|
||||||
const { hostname: domain } = new URL(externalNostrUrl || status.uri);
|
const { hostname: domain } = new URL(externalNostrUrl || status.uri);
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ export const NostrProvider: React.FC<NostrProviderProps> = ({ children }) => {
|
||||||
const { account } = useOwnAccount();
|
const { account } = useOwnAccount();
|
||||||
|
|
||||||
const url = instance.nostr?.relay;
|
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(
|
const signer = useMemo(
|
||||||
() => (accountPubkey ? NKeys.get(accountPubkey) : undefined) ?? window.nostr,
|
() => (accountPubkey ? NKeys.get(accountPubkey) : undefined) ?? window.nostr,
|
||||||
|
|
Ładowanie…
Reference in New Issue