Merge remote-tracking branch 'origin/main' into nostr-onboarding

environments/review-nostr-onbo-4jbnja/deployments/4755
Alex Gleason 1 month ago
commit 1683cdbfb7
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7

@ -32,6 +32,8 @@ function logInNostr(pubkey: string, onboard = false) {
dispatch(startOnboarding());
}
dispatch(setNostrPubkey(undefined));
const { access_token } = dispatch(authLoggedIn(token));
return await dispatch(verifyCredentials(access_token as string));
};
@ -48,7 +50,7 @@ function nostrExtensionLogIn() {
};
}
function setNostrPubkey(pubkey: string) {
function setNostrPubkey(pubkey: string | undefined) {
return {
type: NOSTR_PUBKEY_SET,
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 { hostname: domain } = new URL(externalNostrUrl || status.uri);

@ -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,

Loading…
Cancel
Save