Skip to content

State refactor #3#219

Merged
polymorpher merged 28 commits intofactoryfrom
state_refactor
Dec 24, 2021
Merged

State refactor #3#219
polymorpher merged 28 commits intofactoryfrom
state_refactor

Conversation

@taoalpha
Copy link
Copy Markdown
Collaborator

@taoalpha taoalpha commented Dec 18, 2021

Also change the structure of the wallet state to `address->wallet` map.
@polymorpher
Copy link
Copy Markdown
Owner

change base branch?

@taoalpha taoalpha changed the base branch from master to factory December 18, 2021 07:17
@taoalpha taoalpha requested a review from polymorpher December 18, 2021 08:50
@polymorpher
Copy link
Copy Markdown
Owner

Looks good, but it is not backward compatible. Users would see their wallets disappear and panic. Auto-migration is needed

@taoalpha
Copy link
Copy Markdown
Collaborator Author

Looks good, but it is not backward compatible. Users would see their wallets disappear and panic. Auto-migration is needed

DONE

@polymorpher
Copy link
Copy Markdown
Owner

The overall mechanism looks good (there are some garbage state variable left-over, but they are fine). But since we need to be absolutely sure this works (otherwise all users will complain they lost their wallets), let's be extra careful and test it extensively. I will merge this after v15.

@polymorpher
Copy link
Copy Markdown
Owner

On a second thought, let's merge this first, since there will be a lot more changes later

@polymorpher
Copy link
Copy Markdown
Owner

The left-over variables in wallet are selected and assumed as wallets when useSelector(state => state.wallet) are used. Some pages fail to render because of this, for example, List.jsx

@polymorpher
Copy link
Copy Markdown
Owner

Fixed. Seems fine now.

@polymorpher polymorpher merged commit 321d31a into factory Dec 24, 2021
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