-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Flask] RNTar Android native module for snaps installation #6300
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
7358076
to
604744e
Compare
604744e
to
c93da4d
Compare
469e3cf
to
0a95a9d
Compare
* @param errorMessage - The error message to throw if validation fails. | ||
*/ | ||
function validateSnapShasum(manifest, sourceCode, errorMessage = 'Invalid Snap manifest: manifest shasum does not match computed shasum.') { | ||
- if (manifest.source.shasum !== getSnapSourceShasum(sourceCode)) { |
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.
I was unable to make this implementation work with the Shasum validation (the results are different on Android) so I am disabling it for now and will try to get it working in a future change. The issue to track this work can be found here.
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.
I only had a look at the java part.
It looks good overall, mostly comments with just one memory leak risk on the resource not closing: not sure there's reasons for leak to actually happen, but better using a try/finally or try with resource in case, who knows.
android/app/src/androidTest/java/com/metamask/nativeModules/RNTarTest/RNTarTest.java
Outdated
Show resolved
Hide resolved
android/app/src/androidTest/java/com/metamask/nativeModules/RNTarTest/RNTarTest.java
Show resolved
Hide resolved
android/app/src/androidTest/java/com/metamask/nativeModules/RNTarTest/RNTarTest.java
Outdated
Show resolved
Hide resolved
android/app/src/androidTest/java/com/metamask/nativeModules/RNTarTest/RNTarTest.java
Outdated
Show resolved
Hide resolved
android/app/src/main/java/io/metamask/nativeModules/RNTar/RNTar.java
Outdated
Show resolved
Hide resolved
android/app/src/main/java/io/metamask/nativeModules/RNTar/RNTar.java
Outdated
Show resolved
Hide resolved
android/app/src/main/java/io/metamask/nativeModules/RNTar/RNTar.java
Outdated
Show resolved
Hide resolved
android/app/src/main/java/io/metamask/nativeModules/RNTar/RNTar.java
Outdated
Show resolved
Hide resolved
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.
Nice work! Java part looks safer. Making the code ready for when we will upgrade min sdk is great! (will ease work later)
Development & PR Process
release-xx
label to identify the PR slated for a upcoming release (will be used in release discussion)needs-dev-review
label when work is completedneeds-qa
label when dev review is completedQA Passed
label when QA has signed offDescription
flask
branch and will have failing tests. This is expected for now and we will address the failing tests (that also exist in the flask branch) as we get closer to a stable release.1. What is the reason for the change?
2. What is the improvement/solution?
.tgz
file (the type of file we get from NPM) and extracts its content to the device. We then pass the location of that extracted content to the snaps code and it reads it into the SnapsController.tgz
content, I needed to install/use the Apache commons compress library into the Android project.Screenshots/Recordings
working.on.android.2.mov
Issue
Progresses https://github.com/MetaMask/mobile-planning/issues/731
Checklist