-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Redirect internally for 2FA management from bank account step #30746
Changes from 9 commits
60b155d
8ee188a
2784622
dc28787
b61f097
aa24564
8e77bd5
1f15e5c
a7fce3b
418a672
0b7fa44
305f9a1
3c9085a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -8,7 +8,7 @@ | |||||
* Clear 2FA data if the flow is interrupted without finishing | ||||||
*/ | ||||||
function clearTwoFactorAuthData() { | ||||||
Onyx.merge(ONYXKEYS.ACCOUNT, {recoveryCodes: '', twoFactorAuthSecretKey: '', twoFactorAuthStep: '', codesAreCopied: false}); | ||||||
Onyx.merge(ONYXKEYS.ACCOUNT, {recoveryCodes: null, twoFactorAuthSecretKey: null, twoFactorAuthStep: null, codesAreCopied: false}); | ||||||
} | ||||||
function setTwoFactorAuthStep(twoFactorAuthStep: TwoFactorAuthStep) { | ||||||
Onyx.merge(ONYXKEYS.ACCOUNT, {twoFactorAuthStep}); | ||||||
|
@@ -18,9 +18,9 @@ | |||||
Onyx.merge(ONYXKEYS.ACCOUNT, {codesAreCopied: true}); | ||||||
} | ||||||
|
||||||
function quitAndNavigateBackToSettings() { | ||||||
function quitAndNavigateBack(backTo?: string) { | ||||||
clearTwoFactorAuthData(); | ||||||
Navigation.goBack(ROUTES.SETTINGS_SECURITY); | ||||||
Navigation.goBack(backTo ? backTo : ROUTES.SETTINGS_SECURITY); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To fix TS lint:
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn't using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @blazejkustra what's the best practice for this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My suggestion would be fine. Otherwise just disable lint for this line There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. null coalesce won't work in this case. I think it's fair to use |
||||||
} | ||||||
|
||||||
export {clearTwoFactorAuthData, setTwoFactorAuthStep, quitAndNavigateBackToSettings, setCodesAreCopied}; | ||||||
export {clearTwoFactorAuthData, setTwoFactorAuthStep, quitAndNavigateBack, setCodesAreCopied}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NAB: what's this change for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to remove these data navigating away from 2FA setup. Setting it as null, removes the onyx data.