Changeset View
Changeset View
Standalone View
Standalone View
native/account/registration/connect-ethereum.react.js
Show First 20 Lines • Show All 116 Lines • ▼ Show 20 Lines | function ConnectEthereum(props: Props): React.Node { | ||||
const { navigate } = props.navigation; | const { navigate } = props.navigation; | ||||
const onSuccessfulWalletSignature = React.useCallback( | const onSuccessfulWalletSignature = React.useCallback( | ||||
async (result: SIWEResult) => { | async (result: SIWEResult) => { | ||||
const searchPromise = exactSearchUserCall(result.address); | const searchPromise = exactSearchUserCall(result.address); | ||||
dispatchActionPromise(exactSearchUserActionTypes, searchPromise); | dispatchActionPromise(exactSearchUserActionTypes, searchPromise); | ||||
const { userInfo } = await searchPromise; | const { userInfo } = await searchPromise; | ||||
if (userInfo) { | if (userInfo) { | ||||
const { message, signature } = result; | |||||
navigate<'ExistingEthereumAccount'>({ | navigate<'ExistingEthereumAccount'>({ | ||||
name: ExistingEthereumAccountRouteName, | name: ExistingEthereumAccountRouteName, | ||||
params: { message, signature }, | params: result, | ||||
}); | }); | ||||
} else { | } else { | ||||
// show avatar selection screen | // show avatar selection screen | ||||
} | } | ||||
}, | }, | ||||
[exactSearchUserCall, dispatchActionPromise, navigate], | [exactSearchUserCall, dispatchActionPromise, navigate], | ||||
); | ); | ||||
▲ Show 20 Lines • Show All 84 Lines • Show Last 20 Lines |