diff --git a/native/account/registration/account-does-not-exist.react.js b/native/account/registration/account-does-not-exist.react.js --- a/native/account/registration/account-does-not-exist.react.js +++ b/native/account/registration/account-does-not-exist.react.js @@ -11,7 +11,7 @@ import commSwooshSource from '../../img/comm-swoosh.png'; import { type NavigationRoute, - CoolOrNerdModeSelectionRouteName, + ConnectEthereumRouteName, } from '../../navigation/route-names.js'; import { useStyles } from '../../themes/colors.js'; @@ -22,7 +22,7 @@ function AccountDoesNotExist(props: Props): React.Node { const { navigate } = props.navigation; const onSubmit = React.useCallback(() => { - navigate(CoolOrNerdModeSelectionRouteName); + navigate(ConnectEthereumRouteName); }, [navigate]); const styles = useStyles(unboundStyles); diff --git a/native/account/registration/avatar-selection.react.js b/native/account/registration/avatar-selection.react.js --- a/native/account/registration/avatar-selection.react.js +++ b/native/account/registration/avatar-selection.react.js @@ -36,8 +36,8 @@ export type AvatarSelectionParams = { +userSelections: { - +coolOrNerdMode: CoolOrNerdMode, - +keyserverURL: string, + +coolOrNerdMode?: CoolOrNerdMode, + +keyserverURL?: string, +accountSelection: AccountSelection, +farcasterID: ?string, }, diff --git a/native/account/registration/connect-ethereum.react.js b/native/account/registration/connect-ethereum.react.js --- a/native/account/registration/connect-ethereum.react.js +++ b/native/account/registration/connect-ethereum.react.js @@ -30,6 +30,7 @@ } from '../../navigation/route-names.js'; import { useSelector } from '../../redux/redux-utils.js'; import { useStyles } from '../../themes/colors.js'; +import { defaultURLPrefix } from '../../utils/url-utils.js'; import EthereumLogoDark from '../../vectors/ethereum-logo-dark.react.js'; import SIWEPanel from '../siwe-panel.react.js'; @@ -37,8 +38,8 @@ exactSearchUserActionTypes, ); -export type ConnectEthereumParams = { - +userSelections: { +export type ConnectEthereumParams = ?{ + +userSelections?: { +coolOrNerdMode: CoolOrNerdMode, +keyserverURL: string, }, @@ -52,13 +53,13 @@ }; function ConnectEthereum(props: Props): React.Node { const { params } = props.route; - const { userSelections } = params; const registrationContext = React.useContext(RegistrationContext); invariant(registrationContext, 'registrationContext should be set'); const { cachedSelections } = registrationContext; - const isNerdMode = userSelections.coolOrNerdMode === 'nerd'; + const userSelections = params?.userSelections; + const isNerdMode = userSelections?.coolOrNerdMode === 'nerd'; const styles = useStyles(unboundStyles); let body; @@ -127,11 +128,15 @@ const onSkip = React.useCallback(() => { navigate<'ConnectFarcaster'>({ name: ConnectFarcasterRouteName, - params, + params: { + userSelections: { + ...userSelections, + }, + }, }); - }, [navigate, params]); + }, [navigate, userSelections]); - const { keyserverURL } = userSelections; + const keyserverURL = userSelections?.keyserverURL ?? defaultURLPrefix; const serverCallParamOverride = React.useMemo( () => ({ urlPrefix: keyserverURL, diff --git a/native/account/registration/connect-farcaster.react.js b/native/account/registration/connect-farcaster.react.js --- a/native/account/registration/connect-farcaster.react.js +++ b/native/account/registration/connect-farcaster.react.js @@ -28,8 +28,8 @@ export type ConnectFarcasterParams = { +userSelections: { - +coolOrNerdMode: CoolOrNerdMode, - +keyserverURL: string, + +coolOrNerdMode?: CoolOrNerdMode, + +keyserverURL?: string, +ethereumAccount?: EthereumAccountSelection, }, }; diff --git a/native/account/registration/password-selection.react.js b/native/account/registration/password-selection.react.js --- a/native/account/registration/password-selection.react.js +++ b/native/account/registration/password-selection.react.js @@ -23,8 +23,8 @@ export type PasswordSelectionParams = { +userSelections: { - +coolOrNerdMode: CoolOrNerdMode, - +keyserverURL: string, + +coolOrNerdMode?: CoolOrNerdMode, + +keyserverURL?: string, +farcasterID: ?string, +username: string, }, diff --git a/native/account/registration/registration-navigator.react.js b/native/account/registration/registration-navigator.react.js --- a/native/account/registration/registration-navigator.react.js +++ b/native/account/registration/registration-navigator.react.js @@ -70,7 +70,10 @@ // eslint-disable-next-line no-unused-vars function RegistrationNavigator(props: Props): React.Node { return ( - +