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 @@ -13,7 +13,7 @@ import { useGetEthereumAccountFromSIWEResult } from './registration/ethereum-utils.js'; import { RegistrationContext } from './registration/registration-context.js'; import { enableNewRegistrationMode } from './registration/registration-types.js'; -import { useSIWEServerCall } from './siwe-hooks.js'; +import { useLegacySIWEServerCall } from './siwe-hooks.js'; import SIWEPanel from './siwe-panel.react.js'; import { AccountDoesNotExistRouteName, @@ -63,14 +63,14 @@ ], ); - const siweServerCall = useSIWEServerCall(); + const legacySiweServerCall = useLegacySIWEServerCall(); const successRef = React.useRef(false); const dispatch = useDispatch(); const onSuccess = React.useCallback( async (result: SIWEResult) => { successRef.current = true; try { - await siweServerCall({ + await legacySiweServerCall({ ...result, doNotRegister: enableNewRegistrationMode, }); @@ -97,7 +97,7 @@ }, }); }, - [siweServerCall, dispatch, goBackToPrompt, onAccountDoesNotExist], + [legacySiweServerCall, dispatch, goBackToPrompt, onAccountDoesNotExist], ); const ifBeforeSuccessGoBackToPrompt = React.useCallback(() => { 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 @@ -20,7 +20,7 @@ import { useStyles } from '../../themes/colors.js'; import { UnknownErrorAlertDetails } from '../../utils/alert-messages.js'; import Alert from '../../utils/alert.js'; -import { useSIWEServerCall } from '../siwe-hooks.js'; +import { useLegacySIWEServerCall } from '../siwe-hooks.js'; const siweAuthLoadingStatusSelector = createLoadingStatusSelector(siweAuthActionTypes); @@ -32,13 +32,13 @@ +route: NavigationRoute<'ExistingEthereumAccount'>, }; function ExistingEthereumAccount(props: Props): React.Node { - const siweServerCall = useSIWEServerCall(); + const legacySiweServerCall = useLegacySIWEServerCall(); const { params } = props.route; const dispatch = useDispatch(); const onProceedToLogIn = React.useCallback(async () => { try { - await siweServerCall({ ...params, doNotRegister: true }); + await legacySiweServerCall({ ...params, doNotRegister: true }); } catch (e) { Alert.alert( UnknownErrorAlertDetails.title, @@ -56,7 +56,7 @@ dataLoaded: true, }, }); - }, [siweServerCall, params, dispatch]); + }, [legacySiweServerCall, params, dispatch]); const siweAuthCallLoading = useSelector( state => siweAuthLoadingStatusSelector(state) === 'loading', diff --git a/native/account/registration/registration-server-call.js b/native/account/registration/registration-server-call.js --- a/native/account/registration/registration-server-call.js +++ b/native/account/registration/registration-server-call.js @@ -35,7 +35,7 @@ } from '../../utils/alert-messages.js'; import Alert from '../../utils/alert.js'; import { setNativeCredentials } from '../native-credentials.js'; -import { useSIWEServerCall } from '../siwe-hooks.js'; +import { useLegacySIWEServerCall } from '../siwe-hooks.js'; // We can't just do everything in one async callback, since the server calls // would get bound to Redux state from before the registration. The registration @@ -176,7 +176,7 @@ [logInExtraInfo, callKeyserverRegister, dispatchActionPromise], ); - const siweServerCall = useSIWEServerCall(); + const legacySiweServerCall = useLegacySIWEServerCall(); const dispatch = useDispatch(); const returnedFunc = React.useCallback( (input: RegistrationServerCallInput) => @@ -200,7 +200,7 @@ await identityRegisterUsernameAccount(accountSelection); } else { try { - await siweServerCall(accountSelection, { + await legacySiweServerCall(accountSelection, { urlPrefixOverride: keyserverURL, }); } catch (e) { @@ -230,7 +230,7 @@ currentStep, keyserverRegisterUsernameAccount, identityRegisterUsernameAccount, - siweServerCall, + legacySiweServerCall, dispatch, ], ); 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 @@ -23,7 +23,7 @@ +doNotRegister?: boolean, ... }; -function useSIWEServerCall(): ( +function useLegacySIWEServerCall(): ( SIWEServerCallParams, ?CallSingleKeyserverEndpointOptions, ) => Promise { @@ -93,4 +93,4 @@ ); } -export { useSIWEServerCall }; +export { useLegacySIWEServerCall };