Skip to content

Commit

Permalink
Merge pull request #52489 from Expensify/arosiclair-fix-wallet-log-out
Browse files Browse the repository at this point in the history
[CP Stag] Fix forced log out in enable wallet flow

(cherry picked from commit 9b86b7d)

(CP triggered by francoisl)
  • Loading branch information
arosiclair authored and OSBotify committed Nov 13, 2024
1 parent dbea321 commit 9083b74
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/pages/settings/Wallet/VerifyAccountPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ function VerifyAccountPage({route}: VerifyAccountPageProps) {
const loginData = loginList?.[contactMethod];
const validateLoginError = ErrorUtils.getEarliestErrorField(loginData, 'validateLogin');
const [isUserValidated] = useOnyx(ONYXKEYS.USER, {selector: (user) => !!user?.validated});
const [accountID] = useOnyx(ONYXKEYS.SESSION, {selector: (session) => session?.accountID ?? 0});

const [isValidateCodeActionModalVisible, setIsValidateCodeActionModalVisible] = useState(true);

Expand All @@ -31,9 +30,9 @@ function VerifyAccountPage({route}: VerifyAccountPageProps) {

const handleSubmitForm = useCallback(
(validateCode: string) => {
User.validateLogin(accountID ?? 0, validateCode);
User.validateSecondaryLogin(loginList, contactMethod, validateCode);
},
[accountID],
[loginList, contactMethod],
);

const clearError = useCallback(() => {
Expand Down

0 comments on commit 9083b74

Please sign in to comment.