Skip to content
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
Copy Markdown
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

@ZhenjaHorbach ZhenjaHorbach Nov 13, 2024 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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