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

JSON RPC Engine #1236

Merged
merged 38 commits into from
Jan 16, 2020
Merged

JSON RPC Engine #1236

merged 38 commits into from
Jan 16, 2020

Conversation

brunobar79
Copy link
Contributor

@brunobar79 brunobar79 commented Dec 4, 2019

Replaces the whole provider implementation with https://github.com/metamask/metamask-mobile-provider which internally uses metamask-inpage-provider so we have no more differences between the extension provider and mobile

Fixes #1216 ( Parity with the extension)
Fixes #1209
Fixes #1232

@brunobar79 brunobar79 requested review from ibrahimtaveras00 and estebanmino and removed request for ibrahimtaveras00 December 5, 2019 02:27
@brunobar79 brunobar79 added the needs-qa Any New Features that needs a full manual QA prior to being added to a release. label Dec 5, 2019
const isInitialized = !!vault;
const { network, selectedAddress } = Engine.datamodel.flatState;
return {
...{ isInitialized },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just isInitialized, ?

isEnabled,
selectedAddress: isReady ? selectedAddress.toLowerCase() : null,
networkVersion: network,
chainId: `0x${parseInt(chainId, 10).toString(16)}`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't crash the app but I for rpc networks we'll be returning 0xNaN if that's ok 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a check and set it to null

@ibrahimtaveras00
Copy link
Contributor

ibrahimtaveras00 commented Dec 6, 2019

Issue 1:

On playstore/testflight when I go to uniswap and connect, pretty quickly I can see my balance on top of the ETH dropdown, however, on this branch, I don't see my balance until I reload the page

seen here = http://recordit.co/7ZDqImuJ5Q

Happens on both android + iOS

Issue 2:

Happening on both android + iOS; if I go to migrate.makerdao.com and connect, the next screen just shows an endless spinner = https://recordit.co/JAeGLqcZIf

here's comparison to testflight = http://recordit.co/7ZDqImuJ5Q

Issue 3:

I'm having issues getting the connect modal to pop up when navigating to https://3box.io/ and tapping on choose wallet or log in. For android, I have to reload the page, then it works; while on iOS reloading the page does nothing.

Seen here = http://recordit.co/Q3tLcbgzBv

Issue 4:

When going to peepeth, I can connect w/o any problem, however, when I try to proceed through the sign up flow, It's stopping me with the reason "Install web3 provider"

seen here:
Screen Shot 2019-12-06 at 4 52 07 PM

Issue 5:

Android only; It seems that when I navigate to mainnet.aragon.org and tap on enable account the connect modal doesn't pop up unless I reload the page and tap on enable account again

Issue 6:

MM Homepage > Explore Tab > Buy Crypto > Wyre > Connect with wallet > tap on MM

Endless spinner for "Waiting for signature..."

seen here = http://recordit.co/7varBCtOTQ

Issue 7:

I'm unable to connect to MM Wallet at https://trustless.ethfinex.com/ On iOS it just stays on pending with endless spinner, while on Android, nothing happens when I tap "CONNECT METAMASK"

Screen Shot 2019-12-09 at 3 47 32 PM

ISSUE 8:

I have to reload the page a few times in order to connect kyberswap to my MM wallet; seen here = http://recordit.co/Dg9IaeLyJr

steps:

  • MM Homepage > Explore Tab > Finance > Kyberswap > attempt to connect

Furthermore when I do connect, I am unable to go past this view:
Screen Shot 2019-12-09 at 4 02 30 PM

I basically tried to "SWAP" from KNC to ETH

@ibrahimtaveras00
Copy link
Contributor

ibrahimtaveras00 commented Dec 9, 2019

Good news, I just built latest develop and can knock some things off this list

Issue 1 happens on develop but not playstore (I'll create a different issue for this)

Created = #1240

Issue 6 same, but this time I can reproduce on playstore as well compared to last week (I'll create a different issue for this)

Created = #1241

Issue 7 Same

Created = #1242

I've deleted the above from this PR and updated the list 👍

@brunobar79
Copy link
Contributor Author

brunobar79 commented Jan 15, 2020

@ibrahimtaveras00 just pushed all the fixes.

@estebanmino Could you please take another look ?

Issue 1 - Uniswap - FIXED
Issue 2 - migrate.makerdao.com - FIXED
Issue 3 - 3box - FIXED
Issue 4 - That error is fixed, however it will fail in the very last step of the signup process saying "Error: Unprocessable entity" which is an issue with peepeth itself.
Issue 5 - Aragon - FIXED
Issue 6 - Wyre - FIXED
Issue 7 - ETHFinxes - FIXED
Issue 8 - KyberSwap - FIXED

const { approvedHosts, privacyMode, selectedAddress } = this.props;
const isEnabled = !privacyMode || approvedHosts[hostname];
if (isEnabled) {
res.result = [selectedAddress.toLowerCase()];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why toLowerCase? we have it on checksummed format

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better safe than sorry

Copy link
Contributor

@estebanmino estebanmino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Copy link
Contributor

@ibrahimtaveras00 ibrahimtaveras00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good now on both OS's, QA Passed 👍

@brunobar79 brunobar79 merged commit b131002 into develop Jan 16, 2020
@estebanmino estebanmino deleted the json-rpc-engine-multi-bridge branch February 4, 2020 15:58
rickycodes pushed a commit that referenced this pull request Jan 31, 2022
* inpage => bg working

* eth_requestAccounts working

* publicConfig stream working

* clean up

* signing methods started to work

* all signing methods working

* fix warn

* added all the other wallet methods

* lots of fixes

* update prettierignore

* single iframes working

* break down bgBridge per frame

* progress

* works

* e2e passing

* clean up

* clean up

* lock deps

* use metamask-mobile-provider pkg

* fix e2e uniswap

* fix network/account change

* code review comments

* clean up

* fix

* fix ios build

* android support

* debugging

* fix stream disconnection

* uniswap working

* bump metamask-mobile-provider

* fix all the remaining issues

* Ignore warning
@tommasini tommasini mentioned this pull request Oct 14, 2024
7 tasks
github-merge-queue bot pushed a commit that referenced this pull request Oct 18, 2024
## **Description**
* '@ethersproject/abi' - Can be cleaned from package.json since it's
only used by dependencies

![image](https://github.com/user-attachments/assets/587575bf-8829-4854-8cc5-cc8b0c525fd6)
* @react-native-picker/picker - There is no usage for a picker anymore
in the mobile app ([Introduced
here](#3776))

![image](https://github.com/user-attachments/assets/8e283096-2d84-44a1-b8f7-fc1bc933af93)
* @rnhooks/keyboard - There is no usage for @rnhooks/keyboard
([introduced
here](#1994))

![image](https://github.com/user-attachments/assets/9a3164e1-38dd-40e8-bfc9-92f1cf1cae30)
* asyncstorage-down - there is no usage of asyncstorage-down
([introduced here]
This one was added back, but most likely isn't needed and we need to
think about replacing `react-native-level-fs` and use only one file
system library


* dnode - there is no usage of dnode ([introduced
here](#2798))

![image](https://github.com/user-attachments/assets/deb346d7-8de3-4681-831f-5aa8bdcf2924)##
**Related issues**

![image](https://github.com/user-attachments/assets/04336975-6bea-4f17-96b7-91c942ed4100)Fixes:
* obs-store - There is no usage of obs-store anymoer (introruced
[here](#1236))

![image](https://github.com/user-attachments/assets/da362f05-2c71-4628-9c94-2134bac48c18)

![image](https://github.com/user-attachments/assets/37af9c8c-566e-41d0-9501-5503aa8ab648)
* react-native-flash-message - there is no usage anymore ([introduced
here](#447))

![image](https://github.com/user-attachments/assets/5e76cad3-b675-4139-8884-6464a2a54115)

![image](https://github.com/user-attachments/assets/155d0283-bcff-43b2-8913-a16b440c2efc)
* react-native-redash - there is no usage anymore (react-native-redash)

![image](https://github.com/user-attachments/assets/62037135-ec89-42f2-9476-9db95b0144b3)

![image](https://github.com/user-attachments/assets/9da3f797-9f43-49a8-be91-f4860299158c)


## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [x] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [x] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-qa Any New Features that needs a full manual QA prior to being added to a release.
Projects
None yet
3 participants