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: cleaning of tokens and nano-contract registered after reload #506

Merged
merged 2 commits into from
Jul 8, 2024

Conversation

alexruzenhack
Copy link
Contributor

@alexruzenhack alexruzenhack commented Jul 4, 2024

Acceptance Criteria

  • It should set nanoContract redux state to its initial state after reload be requested

Changing network settings after register nano-contract

When we change the network settings, all registered tokens and nano-contracts are cleaned from storage, therefore the redux state should also resumes to its initial state.

fix-nano-contract-cleaning-after-network-change.mp4

Security Checklist

  • Make sure you do not include new dependencies in the project unless strictly necessary and do not include dev-dependencies as production ones. More dependencies increase the possibility of one of them being hijacked and affecting us.

@@ -1229,6 +1229,7 @@ export const onReloadWalletRequested = (state) => ({
tokensHistory: initialState.tokensHistory,
tokensBalance: initialState.tokensBalance,
loadHistoryStatus: initialState.loadHistoryStatus,
nanoContract: initialState.nanoContract,
Copy link
Member

Choose a reason for hiding this comment

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

I think we should improve this docstring. I thought this reload was for any wallet reload, e.g. when the wallet loses internet connection. But this is only after you connect to a new network settings, right? I think this should be explicit in the docstring

@alexruzenhack alexruzenhack merged commit d1183ee into master Jul 8, 2024
2 checks passed
andreabadesso pushed a commit that referenced this pull request Jul 18, 2024
* fix: cleaning of tokens and nano-contract registered after reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants