Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/AddPersonalBankAccountPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function AddPersonalBankAccountPage() {
} else if (shouldContinue && onSuccessFallbackRoute) {
PaymentMethods.continueSetup(onSuccessFallbackRoute);
} else {
Navigation.goBack();
Navigation.navigate(ROUTES.SETTINGS_WALLET);
}
},
[personalBankAccount],
Expand Down
6 changes: 5 additions & 1 deletion src/pages/settings/Wallet/VerifyAccountPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ function VerifyAccountPage({route}: VerifyAccountPageProps) {
[loginList, contactMethod],
);

const clearError = useCallback(() => {
User.clearContactMethodErrors(contactMethod, 'validateLogin');
}, [contactMethod]);

useEffect(() => {
if (!isUserValidated) {
return;
Expand All @@ -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]}
/>
</View>
Expand Down