diff --git a/native/account/fullscreen-siwe-panel.react.js b/native/account/fullscreen-siwe-panel.react.js --- a/native/account/fullscreen-siwe-panel.react.js +++ b/native/account/fullscreen-siwe-panel.react.js @@ -46,7 +46,7 @@ const onSuccess = React.useCallback( async (result: SIWEResult) => { successRef.current = true; - await siweServerCall(result); + await siweServerCall({ ...result, doNotRegister: true }); dispatch({ type: setDataLoadedActionType, payload: { 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 @@ -44,7 +44,7 @@ const { params } = props.route; const dispatch = useDispatch(); const onProceedToLogIn = React.useCallback(async () => { - await siweServerCall(params); + await siweServerCall({ ...params, doNotRegister: true }); dispatch({ type: setDataLoadedActionType, payload: { diff --git a/native/account/siwe-hooks.js b/native/account/siwe-hooks.js --- a/native/account/siwe-hooks.js +++ b/native/account/siwe-hooks.js @@ -22,6 +22,7 @@ type SIWEServerCallParams = { +message: string, +signature: string, + +doNotRegister?: boolean, ... }; type UseSIWEServerCallParams = { @@ -38,7 +39,7 @@ async ( message: string, signature: string, - extraInfo: LogInExtraInfo, + extraInfo: $ReadOnly<{ ...LogInExtraInfo, +doNotRegister?: boolean }>, callServerEndpointOptions: ?CallServerEndpointOptions, ) => { try { @@ -71,7 +72,10 @@ const dispatchActionPromise = useDispatchActionPromise(); return React.useCallback( - async ({ message, signature }, callServerEndpointOptions) => { + async ( + { message, signature, doNotRegister }, + callServerEndpointOptions, + ) => { const extraInfo = await logInExtraInfo(); const initialNotificationsEncryptedMessage = await getInitialNotificationsEncryptedMessage({ @@ -84,6 +88,7 @@ { ...extraInfo, initialNotificationsEncryptedMessage, + doNotRegister, }, callServerEndpointOptions, );