-
Notifications
You must be signed in to change notification settings - Fork 29
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
feat(frontend): load user profile during login #5460
feat(frontend): load user profile during login #5460
Conversation
// So we need to load it first to enable/disable the rest of the services. | ||
const { success: userProfileSuccess } = await loadUserProfile({ identity: $authIdentity }); | ||
|
||
if (!userProfileSuccess) { |
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 better make this endpoint bulletproof :)
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.
Maybe it's worth adding some retry mechanism here? Not in this PR
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.
Yes, makes sense! Will work on it in another PR (inside service loadUserProfile
)
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.
LGTM, thanks
Motivation
We are going to save the enabled/disabled networks in the backend, in the user profile. So, we need to load the user profile before all the other services, to avoid doing work for disabled networks.
Changes
loadUserProfile
in theonMount
ofLoader
component, before the addresses.Tests
No changes in local replica.