diff --git a/src/components/ValidateCodeActionModal/ValidateCodeForm/BaseValidateCodeForm.tsx b/src/components/ValidateCodeActionModal/ValidateCodeForm/BaseValidateCodeForm.tsx index 1716249c597..f71b957387a 100644 --- a/src/components/ValidateCodeActionModal/ValidateCodeForm/BaseValidateCodeForm.tsx +++ b/src/components/ValidateCodeActionModal/ValidateCodeForm/BaseValidateCodeForm.tsx @@ -126,12 +126,8 @@ function BaseValidateCodeForm({ ); useEffect(() => { - if (!validateError) { - return; - } clearError(); - // eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps - }, [clearError, validateError]); + }, [clearError]); useEffect(() => { if (!hasMagicCodeBeenSent) { diff --git a/src/pages/AddPersonalBankAccountPage.tsx b/src/pages/AddPersonalBankAccountPage.tsx index 24faf40b63f..fdc200f45ad 100644 --- a/src/pages/AddPersonalBankAccountPage.tsx +++ b/src/pages/AddPersonalBankAccountPage.tsx @@ -45,7 +45,7 @@ function AddPersonalBankAccountPage() { } else if (shouldContinue && onSuccessFallbackRoute) { PaymentMethods.continueSetup(onSuccessFallbackRoute); } else { - Navigation.goBack(); + Navigation.navigate(ROUTES.SETTINGS_WALLET); } }, [personalBankAccount], diff --git a/src/pages/settings/Wallet/VerifyAccountPage.tsx b/src/pages/settings/Wallet/VerifyAccountPage.tsx index 1fb39304ec4..e375f03ba58 100644 --- a/src/pages/settings/Wallet/VerifyAccountPage.tsx +++ b/src/pages/settings/Wallet/VerifyAccountPage.tsx @@ -49,6 +49,10 @@ function VerifyAccountPage({route}: VerifyAccountPageProps) { [loginList, contactMethod], ); + const clearError = useCallback(() => { + User.clearContactMethodErrors(contactMethod, 'validateLogin'); + }, [contactMethod]); + useEffect(() => { if (!isUserValidated) { return; @@ -73,7 +77,7 @@ function VerifyAccountPage({route}: VerifyAccountPageProps) { validateCodeAction={validateCodeAction} validateError={validateLoginError} handleSubmitForm={handleSubmitForm} - clearError={() => User.clearContactMethodErrors(contactMethod, 'validateLogin')} + clearError={clearError} buttonStyles={[styles.justifyContentEnd, styles.flex1, safePaddingBottomStyle]} />