Skip to content

Draft: Separate RPC Pipelines + CAIP-27#25516

Merged
jiexi merged 55 commits intojl/mmp-2360/caip-25-pocfrom
jl/mmp-2527/separate-rpc-pipelines-multichain
Jun 27, 2024
Merged

Draft: Separate RPC Pipelines + CAIP-27#25516
jiexi merged 55 commits intojl/mmp-2360/caip-25-pocfrom
jl/mmp-2527/separate-rpc-pipelines-multichain

Conversation

@jiexi
Copy link
Copy Markdown
Member

@jiexi jiexi commented Jun 25, 2024

Description

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

const EXTENSION_ID = 'nonfpcflonapegmnfeafnddgdniflbnk';
const extensionPort = chrome.runtime.connect(EXTENSION_ID)
extensionPort.onMessage.addListener((msg) => console.log('extensionPort on message', msg))
extensionPort.postMessage({
    type: 'caip-x',
    data: {
        "id": 1,
        "jsonrpc": "2.0",
        "method": "provider_request",
        "params": {
            "sessionId": "0xdeadbeef",
            "scope": "eip155:1",
            "request": {
                "method": "eth_chainId",
            }
        }
    }
})
extensionPort.postMessage({
    type: 'caip-x',
    data: {
        "id": 2,
        "jsonrpc": "2.0",
        "method": "provider_request",
        "params": {
            "sessionId": "0xdeadbeef",
            "scope": "eip155:11155111",
            "request": {
                "method": "eth_chainId",
            }
        }
    }
})

Screenshots/Recordings

Before

After

Pre-merge author checklist

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.

@github-actions
Copy link
Copy Markdown
Contributor

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.

@metamaskbot metamaskbot added the team-wallet-api-platform-deprecated DEPRECATED: please use "team-wallet-integrations" instead label Jun 25, 2024
@codecov
Copy link
Copy Markdown

codecov bot commented Jun 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (jl/mmp-2528/externally_connectable-caip-enveloping@487b9ca). Learn more about missing BASE report.

Current head 1ced8f3 differs from pull request most recent head b836f7a

Please upload reports for the commit b836f7a to get more accurate results.

Additional details and impacted files
@@                                  Coverage Diff                                  @@
##             jl/mmp-2528/externally_connectable-caip-enveloping   #25516   +/-   ##
=====================================================================================
  Coverage                                                      ?   69.63%           
=====================================================================================
  Files                                                         ?     1348           
  Lines                                                         ?    47865           
  Branches                                                      ?    13200           
=====================================================================================
  Hits                                                          ?    33328           
  Misses                                                        ?    14537           
  Partials                                                      ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

jiexi added 3 commits June 26, 2024 10:34
…nveloping

# Conflicts:
#	app/scripts/background.js
…o jl/mmp-2527/separate-rpc-pipelines-multichain

# Conflicts:
#	app/scripts/metamask-controller.js
@jiexi jiexi changed the title Draft: Separate RPC Pipelines for CAIP Draft: Separate RPC Pipelines + CAIP-27 Jun 26, 2024
* @param {tabId} [options.tabId] - The tab ID of the sender - if the sender is within a tab
*/
setupProviderEngineCaip({ origin, tabId }) {
const engine = new JsonRpcEngine();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we DRY a bunch of what's common between these 2 provider engines? Or I guess that might defeat the purpose of separating them... 🤔

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yeah it's hard to say. They have a very similar shape. Some of it can probably be DRYed but i'm hoping to deal with that later as this isn't quite ready for review yet

Base automatically changed from jl/mmp-2528/externally_connectable-caip-enveloping to develop June 27, 2024 15:42
@jiexi jiexi changed the base branch from develop to jl/mmp-2360/caip-25-poc June 27, 2024 22:02
@jiexi jiexi marked this pull request as ready for review June 27, 2024 22:37
@jiexi jiexi requested a review from a team as a code owner June 27, 2024 22:37
@jiexi
Copy link
Copy Markdown
Member Author

jiexi commented Jun 27, 2024

Merging this into the branch we'll be using as our feature branch moving forward

@jiexi jiexi merged commit 63e1370 into jl/mmp-2360/caip-25-poc Jun 27, 2024
@jiexi jiexi deleted the jl/mmp-2527/separate-rpc-pipelines-multichain branch June 27, 2024 22:38
@github-actions github-actions bot locked and limited conversation to collaborators Jun 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

team-wallet-api-platform-deprecated DEPRECATED: please use "team-wallet-integrations" instead

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants