-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add @metamask/eth-json-rpc-middleware #9925
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
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. |
| pify "^3.0.0" | ||
| safe-event-emitter "^1.0.1" | ||
|
|
||
| eth-json-rpc-middleware@^6.0.0: |
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.
Note that even after this, eth-json-rpc-middleware@6.0.0 is still used by remaining direct legacy dependencies json-rpc-engine@^6.1.0 and eth-json-rpc-filters@4.2.2.
- These are upgraded (fully removing
eth-json-rpc-middleware@6.0.0) in fix(deps): upgrade eth-json-rpc-filters, eth-json-rpc-engine #9274. - Also, in order to properly align on v12: Upgrade
@metamask/transaction-controllerfrom^13to min^15#9931
|
The work on this branch is finished but it will be merged through the PR #9930 that @legobeat made E2E: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/582806b0-8822-42f7-985f-dae0c8b41b1f |
|
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/@metamask/eth-json-rpc-middleware@12.1.1, npm/eth-json-rpc-middleware@4.3.0, npm/ethereumjs-common@1.5.2, npm/ethereumjs-tx@1.3.7, npm/level-errors@1.0.5, npm/merkle-patricia-tree@2.3.2 |
|
|
|
|
This PR has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 7 days. Thank you for your contributions. |
|
This PR was closed because there has been no follow up activity in 7 days. Thank you for your contributions. |
## **Description** - This PR is a rebase of #10098, including: * #9925 * #9930 - Bump `@metamask/eth-json-rpc-filters` to `^7.0.0` - Bump `@metamask/json-rpc-engine` to `^10.0.0` - Bump `@metamask/eth-json-rpc-middleware` to `^15.0.0` - Migrate from `json-rpc-middleware-stream` to `@metamask/json-rpc-middleware-stream` - Upgrade `@metamask/providers` from v13 to v16 - Also broken out separately as #12085 - Revert `Internal JSON-RPC error` message change to accomodate for `@metamask/rpc-errors` v7 ## **Related issues** Expected to fix the following issues: - [x] #11163 - [x] #11129 - [ ] #11105 - [ ] #9715 - [ ] #8308 - [x] #7926 - [x] #4621 - [x] #4646 - [ ] #12634 #### Blocked by - [x] #12085 - [x] #12047 - [x] #12024 - [x] #11980 - [x] #12008 - [x] #11978 ## **Manual testing steps** 1. Go to in-app browser 2. Test connect with multiple dapps 3. Perform transaciton on test dapp 1. Go to this page... ## **Screenshots/Recordings** https://github.com/MetaMask/metamask-mobile/assets/46944231/c608d957-6684-40e2-8963-67a11dc610df ### **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 - [x] 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** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] 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. --------- Co-authored-by: Aslau Mario-Daniel <marioaslau@gmail.com> Co-authored-by: tommasini <tommasini15@gmail.com> Co-authored-by: kylanhurt <kylan.hurt@gmail.com> Co-authored-by: sethkfman <Seth.Kaufman@consensys.net> Co-authored-by: Nicolas MASSART <nicolas.massart@consensys.net> Co-authored-by: Nico MASSART <NicolasMassart@users.noreply.github.com>
## **Description** - This PR is a rebase of #10098, including: * #9925 * #9930 - Bump `@metamask/eth-json-rpc-filters` to `^7.0.0` - Bump `@metamask/json-rpc-engine` to `^10.0.0` - Bump `@metamask/eth-json-rpc-middleware` to `^15.0.0` - Migrate from `json-rpc-middleware-stream` to `@metamask/json-rpc-middleware-stream` - Upgrade `@metamask/providers` from v13 to v16 - Also broken out separately as #12085 - Revert `Internal JSON-RPC error` message change to accomodate for `@metamask/rpc-errors` v7 ## **Related issues** Expected to fix the following issues: - [x] #11163 - [x] #11129 - [ ] #11105 - [ ] #9715 - [ ] #8308 - [x] #7926 - [x] #4621 - [x] #4646 - [ ] #12634 #### Blocked by - [x] #12085 - [x] #12047 - [x] #12024 - [x] #11980 - [x] #12008 - [x] #11978 ## **Manual testing steps** 1. Go to in-app browser 2. Test connect with multiple dapps 3. Perform transaciton on test dapp 1. Go to this page... ## **Screenshots/Recordings** https://github.com/MetaMask/metamask-mobile/assets/46944231/c608d957-6684-40e2-8963-67a11dc610df ### **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 - [x] 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** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] 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. --------- Co-authored-by: Aslau Mario-Daniel <marioaslau@gmail.com> Co-authored-by: tommasini <tommasini15@gmail.com> Co-authored-by: kylanhurt <kylan.hurt@gmail.com> Co-authored-by: sethkfman <Seth.Kaufman@consensys.net> Co-authored-by: Nicolas MASSART <nicolas.massart@consensys.net> Co-authored-by: Nico MASSART <NicolasMassart@users.noreply.github.com>
## **Description** - This PR is a rebase of #10098, including: * #9925 * #9930 - Bump `@metamask/eth-json-rpc-filters` to `^7.0.0` - Bump `@metamask/json-rpc-engine` to `^10.0.0` - Bump `@metamask/eth-json-rpc-middleware` to `^15.0.0` - Migrate from `json-rpc-middleware-stream` to `@metamask/json-rpc-middleware-stream` - Upgrade `@metamask/providers` from v13 to v16 - Also broken out separately as #12085 - Revert `Internal JSON-RPC error` message change to accomodate for `@metamask/rpc-errors` v7 ## **Related issues** Expected to fix the following issues: - [x] #11163 - [x] #11129 - [ ] #11105 - [ ] #9715 - [ ] #8308 - [x] #7926 - [x] #4621 - [x] #4646 - [ ] #12634 #### Blocked by - [x] #12085 - [x] #12047 - [x] #12024 - [x] #11980 - [x] #12008 - [x] #11978 ## **Manual testing steps** 1. Go to in-app browser 2. Test connect with multiple dapps 3. Perform transaciton on test dapp 1. Go to this page... ## **Screenshots/Recordings** https://github.com/MetaMask/metamask-mobile/assets/46944231/c608d957-6684-40e2-8963-67a11dc610df ### **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 - [x] 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** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] 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. --------- Co-authored-by: Aslau Mario-Daniel <marioaslau@gmail.com> Co-authored-by: tommasini <tommasini15@gmail.com> Co-authored-by: kylanhurt <kylan.hurt@gmail.com> Co-authored-by: sethkfman <Seth.Kaufman@consensys.net> Co-authored-by: Nicolas MASSART <nicolas.massart@consensys.net> Co-authored-by: Nico MASSART <NicolasMassart@users.noreply.github.com>
) ## **Description** - This PR is a rebase of #10098, including: * #9925 * #9930 - Bump `@metamask/eth-json-rpc-filters` to `^7.0.0` - Bump `@metamask/json-rpc-engine` to `^10.0.0` - Bump `@metamask/eth-json-rpc-middleware` to `^15.0.0` - Migrate from `json-rpc-middleware-stream` to `@metamask/json-rpc-middleware-stream` - Upgrade `@metamask/providers` from v13 to v16 - Also broken out separately as #12085 - Revert `Internal JSON-RPC error` message change to accomodate for `@metamask/rpc-errors` v7 ## **Related issues** Expected to fix the following issues: - [x] #11163 - [x] #11129 - [ ] #11105 - [ ] #9715 - [ ] #8308 - [x] #7926 - [x] #4621 - [x] #4646 - [ ] #12634 #### Blocked by - [x] #12085 - [x] #12047 - [x] #12024 - [x] #11980 - [x] #12008 - [x] #11978 ## **Manual testing steps** 1. Go to in-app browser 2. Test connect with multiple dapps 3. Perform transaciton on test dapp 1. Go to this page... ## **Screenshots/Recordings** https://github.com/MetaMask/metamask-mobile/assets/46944231/c608d957-6684-40e2-8963-67a11dc610df ### **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 - [x] 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** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] 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. --------- Co-authored-by: Aslau Mario-Daniel <marioaslau@gmail.com> Co-authored-by: tommasini <tommasini15@gmail.com> Co-authored-by: kylanhurt <kylan.hurt@gmail.com> Co-authored-by: sethkfman <Seth.Kaufman@consensys.net> Co-authored-by: Nicolas MASSART <nicolas.massart@consensys.net> Co-authored-by: Nico MASSART <NicolasMassart@users.noreply.github.com>
) - fix: replace legacy eth-json-rpc deps (#11952) ## **Description** - This PR is a rebase of #10098, including: * #9925 * #9930 - Bump `@metamask/eth-json-rpc-filters` to `^7.0.0` - Bump `@metamask/json-rpc-engine` to `^10.0.0` - Bump `@metamask/eth-json-rpc-middleware` to `^15.0.0` - Migrate from `json-rpc-middleware-stream` to `@metamask/json-rpc-middleware-stream` - Upgrade `@metamask/providers` from v13 to v16 - Also broken out separately as #12085 - Revert `Internal JSON-RPC error` message change to accomodate for `@metamask/rpc-errors` v7 ## **Related issues** Expected to fix the following issues: - [x] #11163 - [x] #11129 - [ ] #11105 - [ ] #9715 - [ ] #8308 - [x] #7926 - [x] #4621 - [x] #4646 - [ ] #12634 #### Blocked by - [x] #12085 - [x] #12047 - [x] #12024 - [x] #11980 - [x] #12008 - [x] #11978 ## **Manual testing steps** 1. Go to in-app browser 2. Test connect with multiple dapps 3. Perform transaciton on test dapp 1. Go to this page... ## **Screenshots/Recordings** https://github.com/MetaMask/metamask-mobile/assets/46944231/c608d957-6684-40e2-8963-67a11dc610df ### **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 - [x] 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** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] 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. --------- Co-authored-by: Aslau Mario-Daniel <marioaslau@gmail.com> Co-authored-by: tommasini <tommasini15@gmail.com> Co-authored-by: kylanhurt <kylan.hurt@gmail.com> Co-authored-by: sethkfman <Seth.Kaufman@consensys.net> Co-authored-by: Nicolas MASSART <nicolas.massart@consensys.net> Co-authored-by: Nico MASSART <NicolasMassart@users.noreply.github.com> [d967a76](d967a76) Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com> Co-authored-by: Aslau Mario-Daniel <marioaslau@gmail.com> Co-authored-by: tommasini <tommasini15@gmail.com> Co-authored-by: kylanhurt <kylan.hurt@gmail.com> Co-authored-by: sethkfman <Seth.Kaufman@consensys.net> Co-authored-by: Nicolas MASSART <nicolas.massart@consensys.net> Co-authored-by: Nico MASSART <NicolasMassart@users.noreply.github.com>



Description
We need to add @metamask/eth-json-rpc-middleware v^12 package, and we can remove the used eth-json-rpc-middleware v4 from our package.json
We need also to replace the usage of it on the application (Snaps and BackgroundBridge)
It would also be good to refactor it to use ecmascript (import) instead of commonJS (require) syntax!
Issue: https://github.com/MetaMask/mobile-planning/issues/1805
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Recording.12.mp4
Pre-merge author checklist
Pre-merge reviewer checklist