Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CP Stag] Fix forced log out in enable wallet flow #52489

Merged
merged 1 commit into from
Nov 13, 2024
Merged
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
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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a minor comment
But we don't use validateLogin anywhere else
So in theory we could remove validateLogin

Copy link
Contributor

@ZhenjaHorbach ZhenjaHorbach Nov 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But It's not critical
Plus we have this issue
That in the background we navigate to the wallet screen when we press Pay with Expensify and Enter magic code
But I think we can fix all this in a separate PR

Снимок экрана 2024-11-13 в 19 13 53

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But we don't use validateLogin anywhere else
So in theory we could remove validateLogin

I'm planning on reintroducing it later so we can just leave it for now.

That in the background we navigate to the wallet screen when we press Pay with Expensify and Enter magic code
But I think we can fix all this in a separate PR

We'll address that in this issue.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case no more questions
Thanks !
I'll finish the review soon

User.validateSecondaryLogin(loginList, contactMethod, validateCode);
},
[accountID],
[loginList, contactMethod],
);

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