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

Add IPFS connection point #2920

Merged
merged 21 commits into from
Nov 8, 2022
Merged

Add IPFS connection point #2920

merged 21 commits into from
Nov 8, 2022

Conversation

JamesSmartCell
Copy link
Member

This PR adds a service for resolving IPFS more reliably than previously - if there's a socket timeout it switches to an alternate IPFS provider.

It also provides a more reliable IPFS resolve as there are fewer paths.

Also

  • Add unit test for the new service
  • Resolve specific IPFS hash for the certificate test - note that certificate test is a test for ERC5169 used with IPFS not the actual IPFS resolution itself.

@github-actions
Copy link

github-actions bot commented Nov 7, 2022

Pull reviewers stats

Stats of the last 30 days for alpha-wallet-android:

User Total reviews Time to review Total comments
JamesSmartCell
🥇
8
▀▀▀▀
1d 1h 25m
▀▀▀
12
▀▀▀▀▀▀
seabornlee
🥈
8
▀▀▀▀
3h 41m
7
▀▀▀▀
justindg
🥉
4
▀▀
1d 19h 48m
▀▀▀▀▀▀
0

@codecov
Copy link

codecov bot commented Nov 7, 2022

Codecov Report

Base: 7.51% // Head: 7.57% // Increases project coverage by +0.06% 🎉

Coverage data is based on head (bb5fcff) compared to base (40c5bcf).
Patch coverage: 42.72% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##             master   #2920      +/-   ##
===========================================
+ Coverage      7.51%   7.57%   +0.06%     
- Complexity      810     833      +23     
===========================================
  Files           608     611       +3     
  Lines         41792   41827      +35     
  Branches       4234    4241       +7     
===========================================
+ Hits           3139    3167      +28     
+ Misses        38393   38388       -5     
- Partials        260     272      +12     
Impacted Files Coverage Δ
...a/com/alphawallet/app/entity/ContractInteract.java 0.00% <0.00%> (ø)
...awallet/app/service/TransactionsNetworkClient.java 2.85% <0.00%> (-0.04%) ⬇️
...lphawallet/app/service/AssetDefinitionService.java 6.13% <6.66%> (-0.01%) ⬇️
...n/java/com/alphawallet/app/web3j/ens/NameHash.java 73.52% <20.00%> (-9.81%) ⬇️
.../src/main/java/com/alphawallet/app/util/Utils.java 11.11% <28.57%> (+0.95%) ⬆️
.../java/com/alphawallet/app/service/IPFSService.java 48.71% <48.71%> (ø)
...alphawallet/app/entity/tokenscript/TestScript.java 50.00% <50.00%> (ø)
...java/com/alphawallet/app/entity/QueryResponse.java 80.00% <80.00%> (ø)
...ava/com/alphawallet/app/di/RepositoriesModule.java 88.88% <95.00%> (+0.42%) ⬆️
... and 1 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

* Collect code check result

* Fix path

* Ignore error

* Comment PR

* Don't print color

* Fix command
@github-actions
Copy link

github-actions bot commented Nov 8, 2022

app/src/main/java/com/alphawallet/app/entity/tokenscript/TestScript.java:
8: Line too long (10868 instead of 200)

1 errors found

app/src/main/java/com/alphawallet/app/service/AssetDefinitionService.java:
Wrong line endings or new final newline
163: Wrong amount of left-padding spaces(want multiple of 4)
164: Wrong amount of left-padding spaces(want multiple of 4)
1087: Wrong amount of left-padding spaces(want multiple of 4)
1464: Wrong amount of left-padding spaces(want multiple of 4)
1881: Line too long (211 instead of 200)

6 errors found

app/src/main/java/com/alphawallet/app/service/TransactionsNetworkClient.java:
627: Wrong amount of left-padding spaces(want multiple of 4)
717: Wrong amount of left-padding spaces(want multiple of 4)
728: Line too long (214 instead of 200)
973: Wrong amount of left-padding spaces(want multiple of 4)
991: Line too long (208 instead of 200)

5 errors found

app/src/main/java/com/alphawallet/app/web3j/ens/NameHash.java:
86: Line too long (225 instead of 200)

1 errors found

@github-actions
Copy link

github-actions bot commented Nov 8, 2022

app/src/main/java/com/alphawallet/app/service/AssetDefinitionService.java:
Wrong line endings or new final newline
163: Wrong amount of left-padding spaces(want multiple of 4)
164: Wrong amount of left-padding spaces(want multiple of 4)
1087: Wrong amount of left-padding spaces(want multiple of 4)
1464: Wrong amount of left-padding spaces(want multiple of 4)
1881: Line too long (211 instead of 200)

6 errors found

app/src/main/java/com/alphawallet/app/service/TransactionsNetworkClient.java:
627: Wrong amount of left-padding spaces(want multiple of 4)
717: Wrong amount of left-padding spaces(want multiple of 4)
728: Line too long (214 instead of 200)
973: Wrong amount of left-padding spaces(want multiple of 4)
991: Line too long (208 instead of 200)

5 errors found

app/src/main/java/com/alphawallet/app/web3j/ens/NameHash.java:
86: Line too long (225 instead of 200)

1 errors found

@github-actions
Copy link

github-actions bot commented Nov 8, 2022

app/src/main/java/com/alphawallet/app/service/TransactionsNetworkClient.java:
627: Wrong amount of left-padding spaces(want multiple of 4)
974: Wrong amount of left-padding spaces(want multiple of 4)

2 errors found

@JamesSmartCell JamesSmartCell merged commit a907ea3 into master Nov 8, 2022
@JamesSmartCell JamesSmartCell deleted the fix-certificate-test branch November 8, 2022 04:57
keval-finimble pushed a commit that referenced this pull request Nov 10, 2022
* Shift to using type interface for IPFSService to make it possible to implement IO-free unit tests
* Update IPFS usage and add unit testing for new service.
* Fix certificate test
* Updates as suggested
JamesSmartCell added a commit that referenced this pull request Nov 18, 2022
* Shift to using type interface for IPFSService to make it possible to implement IO-free unit tests
* Update IPFS usage and add unit testing for new service.
* Fix certificate test
* Updates as suggested
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.

2 participants