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 @@ -122,10 +122,9 @@ const { userInfo } = await searchPromise; if (userInfo) { - const { message, signature } = result; navigate<'ExistingEthereumAccount'>({ name: ExistingEthereumAccountRouteName, - params: { message, signature }, + params: result, }); } else { // show avatar selection screen diff --git a/native/account/registration/existing-ethereum-account.react.js b/native/account/registration/existing-ethereum-account.react.js --- a/native/account/registration/existing-ethereum-account.react.js +++ b/native/account/registration/existing-ethereum-account.react.js @@ -1,10 +1,12 @@ // @flow import * as React from 'react'; -import { Text, Alert } from 'react-native'; +import { Text, View, Alert } from 'react-native'; import { siweAuthActionTypes } from 'lib/actions/siwe-actions.js'; +import { useENSName } from 'lib/hooks/ens-cache.js'; import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors.js'; +import type { SIWEResult } from 'lib/types/siwe-types.js'; import RegistrationButtonContainer from './registration-button-container.react.js'; import RegistrationButton from './registration-button.react.js'; @@ -19,10 +21,7 @@ const siweAuthLoadingStatusSelector = createLoadingStatusSelector(siweAuthActionTypes); -export type ExistingEthereumAccountParams = { - +message: string, - +signature: string, -}; +export type ExistingEthereumAccountParams = SIWEResult; type Props = { +navigation: RegistrationNavigationProp<'ExistingEthereumAccount'>, @@ -48,18 +47,31 @@ state => siweAuthLoadingStatusSelector(state) === 'loading', ); + const { address } = params; + const walletIdentifier = useENSName(address); + const walletIdentifierTitle = + walletIdentifier === address ? 'Ethereum wallet' : 'ENS name'; + const { goBack } = props.navigation; const styles = useStyles(unboundStyles); return ( - - Account already exists for Ethereum wallet - + Account already exists for wallet You can proceed to log in with this wallet, or go back and use a different wallet. + + + {walletIdentifierTitle} + + + + {walletIdentifier} + + +