-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix Browser Injection for both platforms #113
Conversation
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 love that you externalized the custom webview stuff. This is huge. Awesome work.
@@ -118,4 +118,11 @@ class InpageBridge { | |||
|
|||
window.ethereum = new InpageBridge(); | |||
|
|||
window.originalPostMessage({ type: 'ETHEREUM_PROVIDER_SUCCESS' }, '*'); | |||
function safePostMessage(msg) { |
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.
Was there a race condition?
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.
Yes, there was on android. We need to wait for the RN bridge to be ready to apply the polyfill and sometimes it happens a little bit after the injection. Then it will trigger a JS exception and it will break everything else.
echo "Done" | ||
|
||
echo "9. Fix all android build warnings..." |
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.
😦Android is killin' us.
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.
Those fixes are because I upgraded the project to use a more 'up-to-date' gradle version and build targets to use more modern webview features. They deprecated the way you require dependencies and it will break by the end of 2018, so better fixing it now until each pkg owner fixes it themselves
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.
with these changes I'm not able to run npm install
taking out the section 9. Fix all android build warnings...
works fine.
@estebanmino You’re using linux. Sed has a different syntax. That’s why.
On Sat, Sep 1, 2018 at 20:29 Esteban Miño ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In scripts/postinstall.sh
<MetaMask/website#113 (comment)>:
> echo "Done"
+
+echo "9. Fix all android build warnings..."
with these changes I'm not able to run npm install taking out the section 9.
Fix all android build warnings... works fine.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<MetaMask/website#113 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABMKWpgNw4cfRbG7W5QOye4jc07abcndks5uWyZYgaJpZM4WWXrt>
.
--
*Bruno Barbieri* // Senior Javascript Engineer @ Metamask
49 Bogart St, Suite 22, Brooklyn NY 11206
Web <https://consensys.net/> | Twitter <https://twitter.com/brunobar79> |
Linkedin <https://www.linkedin.com/in/brunobar79/> | Github
<https://github.com/brunobar79>
|
* android working with request interception * fix reload * progress bar working on android * working like a charm * migrate to react-native-web3-webview * fix unit tests * update unit tests * working * clean up * cleanup * use mac osx for builds * fix circle config
Description
Added progress bar for Android
Fixed all android build warnings
Migrated to react-native-web3-webview which handles both iOS and android injection correctly.
For iOS there are no major changes, except we now own the package we use and I've created a standard API for both platforms.
For Android this allows to intercept http requests which is a much more solid approach than before.
Web3 injection + provider now works reliably on both platforms.
DEMO:
Checklist
Issue
Resolves #97, #3 and #22