-
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
Conversation
Jenkins BuildsClick to see older builds (131)
|
be87d05
to
2f4a1d5
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #6315 +/- ##
===========================================
+ Coverage 59.64% 59.67% +0.02%
===========================================
Files 864 865 +1
Lines 112866 112981 +115
===========================================
+ Hits 67324 67417 +93
- Misses 37717 37743 +26
+ Partials 7825 7821 -4
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
668fc27
to
d6a67cb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job!
d6a67cb
to
86fa895
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work @dlipicar!
21ad7f5
to
8003c9c
Compare
status-mobile PR: status-im/status-mobile#22117 |
8003c9c
to
f799561
Compare
f799561
to
8e57987
Compare
Part of status-im/status-desktop#17091
I swear
deactivatable
is a real word: https://en.wiktionary.org/wiki/deactivatableThere'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 to add new chains, and we've got dedicated endpoints for network user-editable fields.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.