-
Notifications
You must be signed in to change notification settings - Fork 273
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
BLO-739 fix: 2fa state transition #1768
Conversation
53ffadd
to
ec8bca9
Compare
ec8bca9
to
c53aa95
Compare
return "Two-factor account protection" | ||
}, [isAdding, status]) | ||
|
||
const shieldIsLoading = liveAccountGuardianState.status === "PENDING" |
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.
this should be in a usememo no ?
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.
I believe is okay if it's not a complex / slow operation, memoizing and checking the memo may well make it slower. More about 'expensive' calculations here: https://beta.reactjs.org/learn/you-might-not-need-an-effect#updating-state-based-on-props-or-state
} | ||
} | ||
if (status === "PENDING") { | ||
return { |
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.
mb instead of having ternaries everywhere we can have just one if ?
Issue / feature description
Fixes an issue where the 'live' state of 2FA on account was not in sync with on-chain state and would show momentarily in the wrong state
Changes
Checklist