Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

refactor: adjust profile restoration logic #3372

Merged
merged 1 commit into from
Feb 22, 2021

Conversation

goga-m
Copy link
Contributor

@goga-m goga-m commented Feb 19, 2021

Summary

  • Cleanup code and move profile restoration checks and logic in useProfileSyncStatus
  • Refine checks using shouldRestore to prevent duplicate restorations
  • Fix reload issue in dev mode for passwordless profiles (white screen or profile saving without restoring)

Checklist

  • My changes look good in both light AND dark mode
  • The change is not hardcoded to a single network, but has multi-asset in mind
  • I checked my changes for obvious issues, debug statements and commented code
  • Documentation (if necessary)
  • Tests (if necessary)
  • Ready to be merged

@faustbrian
Copy link
Contributor

Copy link
Contributor

@samharperpittam samharperpittam left a comment

Choose a reason for hiding this comment

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

Spent a lot of time trying to break this but can't. Seems solid.

@samharperpittam samharperpittam dismissed their stale review February 19, 2021 16:49

Found an issue

@samharperpittam
Copy link
Contributor

Reloading the wallet whilst in a profile which is password protected results in.

Unhandled Rejection (Error): Failed to decode or decrypt the profile. Reason: Unexpected token c in JSON at position 1

This then bricks the other profiles and a reset of the DB is required.

@faustbrian faustbrian merged commit b0c370a into develop Feb 22, 2021
@faustbrian faustbrian deleted the refactor/profile-restoration branch February 22, 2021 03:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants