Skip to content

Conversation

@mirceanis
Copy link
Contributor

What's here

This changeset deprecates the global mutable Networks object in favor of locally configured MultiNetworkConfig instance(s)

Local configurations are potentially lighter-weight and don't overwrite each other.
Future versions will completely remove the default infura URLs as well, and local configurations will be a necessity then.

Also, this paves the way to non-JsonRPC based ethereum providers and to true multi-platform.

A an added bonus, the default MultiNetworkConfig allows networks to be indexed both by networkID and by name.

Testing

Methods have been added to check all known paths of interaction with the multi-network configuration holders.

The deprecated Networks object now implements that same interface and all existing tests have been kept.

@mirceanis mirceanis requested a review from ugoamanoh August 19, 2019 14:45
@codecov
Copy link

codecov bot commented Aug 19, 2019

Codecov Report

Merging #4 into develop will increase coverage by 0.49%.
The diff coverage is 100%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop       #4      +/-   ##
=============================================
+ Coverage      38.64%   39.14%   +0.49%     
+ Complexity        16       10       -6     
=============================================
  Files             14       15       +1     
  Lines            370      373       +3     
  Branches          36       36              
=============================================
+ Hits             143      146       +3     
  Misses           216      216              
  Partials          11       11
Impacted Files Coverage Δ Complexity Δ
...in/java/me/uport/sdk/core/NetworkConfigurations.kt 100% <100%> (ø) 0 <0> (?)
core/src/main/java/me/uport/sdk/core/Networks.kt 86.44% <100%> (-1.62%) 2 <1> (-6)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 190da2e...0e122c7. Read the comment docs.

@mirceanis mirceanis changed the title [Feature] multi network local config [WIP][Feature] multi network local config Aug 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant