-
Notifications
You must be signed in to change notification settings - Fork 250
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
feat(network)_: implement deactivatable networks #6315
Open
dlipicar
wants to merge
5
commits into
develop
Choose a base branch
from
feat/implement-deactiveable-networks
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Jenkins BuildsClick to see older builds (66)
|
2 tasks
be87d05
to
2f4a1d5
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #6315 +/- ##
===========================================
+ Coverage 60.30% 60.31% +0.01%
===========================================
Files 845 846 +1
Lines 111258 111409 +151
===========================================
+ Hits 67095 67201 +106
- Misses 36342 36394 +52
+ Partials 7821 7814 -7
Flags with carried forward coverage won't be shown. Click here to find out more.
|
7c849a8
to
d7d7aa8
Compare
ae1544a
to
2ee1371
Compare
2ee1371
to
e68cd86
Compare
e68cd86
to
668fc27
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Part of status-im/status-desktop#17091
There's basically three parts to this PR:
IsActive
andIsDeactivatable
to each network: f87f53eIsActive
lets the user select which chains are available for use across the app (as opposed toIsEnabled
, which simply means whether a chain is considered when displaying balances, collectibles and activity). No provider calls should occur for networks that are not active at a given time (just like what's expected of Testnet chains when the app is in Mainnet mode and viceversa)IsDeactivatable
lets the client know whether a network can be deactivated. Some critical app features require specific networks to always be active (Mainnet and Sepolia).New API
SetChainActive
lets the user toggle this setting. Some checks are in place to ensure only Deactivatable chains can be deactivated, and no more than 5 chains are active at a given time.Since custom chains are not supported for now
AddEthereumChain
andDeleteEthereumChain
are marked as deprecated. Half the app will malfunction if the client uses these endpoints.This is just a pub-subby way for status-go modules to react to changes in the list of networks.
Ideally we extend this to other modules which depend on the client to notify about network changes, which is more error-prone. (Separate issues status-im/status-desktop#17182 and status-im/status-desktop#17183)
The rest is just changes to make tests happy.