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

chore: preserved cross account loaded data #1848

Open
wants to merge 3 commits into
base: production
Choose a base branch
from

Conversation

faboweb
Copy link
Contributor

@faboweb faboweb commented Jun 9, 2022

staking balances get wiped on sign out instead of keeping them for each account like the balances

@github-actions
Copy link

github-actions bot commented Jun 9, 2022

Visit the preview URL for this PR (updated for commit f578417):

https://emeris-app--pr1848-chore-improve-sign-o-z0v2xnc1.web.app

(expires Wed, 22 Jun 2022 10:27:23 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

@clockworkgr
Copy link
Collaborator

staking balances get wiped on sign out instead of keeping them for each account like the balances

They are supposed to get wiped out....On sign out we remove account specific data because we're signing out.

Technically this PR changes nothing.

state.balances contains account balances as well as module balances (used for pool token price calculations)

getter filters out module balances to only get account balances and sign_out only deletes account balances so module balances are unaffected.

state.stakingBalances and state.unbondingDelegations ONLY contain account data (i.e. their keyhash keys are ALWAYS the keyhashes in getKeyhashes so:
a) getter filtering is unnecessary
b) sign_out deletion of said keyhashes results in the same empty object as previous code

@faboweb
Copy link
Contributor Author

faboweb commented Jun 16, 2022

In a multi account setup you don't want to reload the data on every account switch I thought. On a sign out you would remove the data you signed out of I thought. In an account overview you also probably want to show total balances of all accounts. Currently only data for one account can be loaded in parallel.

@clockworkgr
Copy link
Collaborator

In a multi account setup you don't want to reload the data on every account switch I thought. On a sign out you would remove the data you signed out of I thought. In an account overview you also probably want to show total balances of all accounts. Currently only data for one account can be loaded in parallel.

app is not set for multiaccount though...its only supposed to handle one account at the time

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.

3 participants