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

fix: bug switching to new verison of bc wallet #1914

Merged
merged 1 commit into from
Apr 12, 2024
Merged

Conversation

wadeking98
Copy link
Contributor

Previously the call in container-imp was using a shallow copy with the initial state, this meant that the new onboarding state wouldn't be copied and would result in postAuthScreens and didCompleteOnboarding to be undefined. I changed the functionality to have a deeper copy and that fixed the issue

Signed-off-by: wadeking98 <wkingnumber2@gmail.com>
Copy link

sonarcloud bot commented Apr 12, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@jleach jleach self-requested a review April 12, 2024 19:27
@jleach jleach changed the title fixed bug switching to new verison of bc wallet fix: bug switching to new verison of bc wallet Apr 12, 2024
tours,
onboarding,
dismissPersonCredentialOffer: personCredOfferDissmissed,
loginAttempt: {...initialState.loginAttempt, ...loginAttempt},
Copy link
Member

@jleach jleach Apr 12, 2024

Choose a reason for hiding this comment

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

Using {...} to copy an object in JavaScript is good for a basic copy and works in simple cases. But, it only copies the first layer deeply. If you have objects or arrays inside, they're still linked to the original, which may not be what you want for a complete deep copy. If you have nested objects or arrays you may want _.deepCopy() or something similar.

@wadeking98 wadeking98 merged commit 98aa2a5 into main Apr 12, 2024
12 of 14 checks passed
@wadeking98 wadeking98 deleted the fix-onboarding-state branch April 12, 2024 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants