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

feat: CAIP Multichain (New) #27782

Draft
wants to merge 366 commits into
base: caip25-permission-migration
Choose a base branch
from

Conversation

jiexi
Copy link
Contributor

@jiexi jiexi commented Oct 10, 2024

Description

This branch is the feature branch for CAIP-25, CAIP-27, CAIP stream bifurcation. TODO better PR desc.

Open in GitHub Codespaces

Related issues

Related: MetaMask/core#4813
Upstream: #27847

See: https://github.com/MetaMask/MetaMask-planning/issues/2360
See: MetaMask/test-dapp#324

Manual testing steps

BARAD_DUR=1 CHAIN_PERMISSIONS=1 yarn start

Replace EXTENSION_ID with your local extension ID

// Setup
const EXTENSION_ID = 'nonfpcflonapegmnfeafnddgdniflbnk';
const extensionPort = chrome.runtime.connect(EXTENSION_ID)
extensionPort.onMessage.addListener((msg) => {
    // format wallet_notify events nicely so that we can read them more easily later
    if (msg.data.method === 'wallet_notify') {
        console.log('wallet_notify:', {
            scope: msg.data.params.scope,
            method: msg.data.params.notification.method,
            subscription: msg.data.params.notification.params.subscription,
            number: msg.data.params.notification.params.result.number
        })
        return;
    }
    console.log(msg.data)
})


// Initial Connection
extensionPort.postMessage({
    type: 'caip-x',
    data: {
        "jsonrpc": "2.0",
        method: 'wallet_createSession',
        params: {
            requiredScopes: {
            },
            optionalScopes: {
                'eip155:1': {
                    methods: [
                        'eth_blockNumber',
                        'eth_gasPrice',
                        'eth_getTransactionCount'
                    ],
                    notifications: [],
                    accounts: []
                }
            },
        },
    }
})


extensionPort.postMessage({
    type: 'caip-x',
    data: {
        "jsonrpc": "2.0",
        method: 'wallet_invokeMethod',
        params: {
            scope: 'eip155:1',
            request: {
                "method": "eth_blockNumber",
                "params": [],
            }
        }
    }
})

extensionPort.postMessage({
    type: 'caip-x',
    data: {
        "jsonrpc": "2.0",
        method: 'wallet_invokeMethod',
        params: {
            scope: 'eip155:1',
            request: {
                "method": "eth_gasPrice",
                "params": [],
            }
        }
    }
})

extensionPort.postMessage({
    type: 'caip-x',
    data: {
        "jsonrpc": "2.0",
        method: 'wallet_invokeMethod',
        params: {
            scope: 'eip155:1',
            request: {
                "method": "eth_getTransactionCount",
                "params": ["0x5bA08AF1bc30f17272178bDcACA1C74e94955cF4", "latest"],
            }
        }
    }
})

// Not very interesting, let’s do this on Sepolia where I have some tx

extensionPort.postMessage({
    type: 'caip-x',
    data: {
        "jsonrpc": "2.0",
        method: 'wallet_invokeMethod',
        params: {
            scope: 'eip155:11155111',
            request: {
                "method": "eth_getTransactionCount",
                "params": ["0x5bA08AF1bc30f17272178bDcACA1C74e94955cF4", "latest"],
            }
        }
    }
})


// Oh no, an error. Let’s fix that
extensionPort.postMessage({
    type: 'caip-x',
    data: {
        "jsonrpc": "2.0",
        method: 'wallet_createSession',
        params: {
            requiredScopes: {
            },
            optionalScopes: {
                'eip155:1': {
                    methods: [
                        'eth_blockNumber',
                        'eth_gasPrice',
                        'eth_getTransactionCount'
                    ],
                    notifications: [],
                    accounts: []
                },
                'eip155:11155111': {
                    methods: [
                        'eth_blockNumber',
                        'eth_gasPrice',
                        'eth_getTransactionCount'
                    ],
                    notifications: [],
                    accounts: []
                }
            },
        },
    }
})

// And try again
extensionPort.postMessage({
    type: 'caip-x',
    data: {
        "jsonrpc": "2.0",
        method: 'wallet_invokeMethod',
        params: {
            scope: 'eip155:11155111',
            request: {
                "method": "eth_getTransactionCount",
                "params": ["0x5bA08AF1bc30f17272178bDcACA1C74e94955cF4", "latest"],
            }
        }
    }
})

// What if I want even more chains and methods and subscriptions and preselected accounts?
extensionPort.postMessage({
    type: 'caip-x',
    data: {
        "jsonrpc": "2.0",
        method: 'wallet_createSession',
        params: {
            requiredScopes: {
            },
            optionalScopes: {
                'eip155:1': {
                    methods: [
                        'eth_blockNumber',
                        'eth_gasPrice',
                        'eth_getTransactionCount',
                        'eth_sendTransaction', 
                        'eth_subscribe'
                    ],
                    notifications: ['eth_subscription'],
                    accounts: []
                },
                'eip155:11155111': {
                    methods: [
                        'eth_blockNumber',
                        'eth_gasPrice',
                        'eth_getTransactionCount',
                        'eth_sendTransaction', 
                        'eth_subscribe'
                    ],
                    notifications: ['eth_subscription'],
                    accounts: ['eip155:11155111:0x5bA08AF1bc30f17272178bDcACA1C74e94955cF4', 'eip155:11155111:0xEe166a3eec4796DeC6A1D314e7485a52bBe68e4d']
                },
                'eip155:59144': {
                    methods: [
                        'eth_estimateGas',
                    ],
                    notifications: [],
                    accounts: []
                },
            },
        },
    }
})










// What if I want to deny some requested chains and add extras?
// Rerun above, Remove Linea, add Linea Sepolia. Show how the added chains get the full permission set


// My dapp that just loaded / I forgot what my permissions look like / I want to check what my permissions currently look like.
extensionPort.postMessage({
    type: 'caip-x',
    data: {
        "jsonrpc": "2.0",
        method: 'wallet_getSession',
        params:{}
    }
})

// What if the user modifies the permission outside of my dapp? How will I know without checking wallet_getSession frequently?
// Modify permission in page. Check for wallet_sessionChanged event


// What if I want to disconnect from the session entirely?
extensionPort.postMessage({
    type: 'caip-x',
    data: {
        "jsonrpc": "2.0",
        method: 'wallet_revokeSession',
        params:{}
    }
})


// Let’s send some transactions! On sepolia and linea sepolia

extensionPort.postMessage({
    type: 'caip-x',
    data: {
        "jsonrpc": "2.0",
        method: 'wallet_createSession',
        params: {
            requiredScopes: {
            },
            optionalScopes: {
                'eip155:1': {
                    methods: [
                        'eth_sendTransaction', 
                        'eth_subscribe'
                    ],
                    notifications: ['eth_subscription'],
                    accounts: []
                },
                'eip155:11155111': {
                    methods: [
                        'eth_sendTransaction', 
                        'eth_subscribe'
                    ],
                    notifications: ['eth_subscription'],
                    accounts: ['eip155:11155111:0x5bA08AF1bc30f17272178bDcACA1C74e94955cF4', 'eip155:11155111:0xEe166a3eec4796DeC6A1D314e7485a52bBe68e4d']
                },
                'eip155:59141': {
                    methods: [
                        'eth_sendTransaction',
                    ],
                    notifications: [],
                    accounts: []
                },
            },
        },
    }
})


extensionPort.postMessage({
    type: 'caip-x',
    data: {
        "jsonrpc": "2.0",
        method: 'wallet_invokeMethod',
        params: {
            scope: 'eip155:11155111',
            request: {
                "method": "eth_sendTransaction",
                 "params": [
                  {
                    from: "0x5bA08AF1bc30f17272178bDcACA1C74e94955cF4",
                    to: "0x0000000000000000000000000000000000000000",
                    gas: "0x76c0",
                    value: "0x2bdbb64bc09000",
                    data: "0x",
                  }
                ],
            }
        }
    }
})


extensionPort.postMessage({
    type: 'caip-x',
    data: {
        "jsonrpc": "2.0",
        method: 'wallet_invokeMethod',
        params: {
            scope: 'eip155:59141',
            request: {
                "method": "eth_sendTransaction",
                 "params": [
                  {
                    from: "0x5bA08AF1bc30f17272178bDcACA1C74e94955cF4",
                    to: "0x0000000000000000000000000000000000000000",
                    gas: "0x76c0",
                    value: "0x2bdbb64bc09000",
                    data: "0x",
                  }
                ],
            }
        }
    }
})

// You can even be receive eth subscriptions events on multiple chains at the same time, previously impossible.
extensionPort.postMessage({
    type: 'caip-x',
    data: {
        "jsonrpc": "2.0",
        method: 'wallet_invokeMethod',
        params: {
            scope: 'eip155:1',
            request: {
                "method": "eth_subscribe",
                 "params": [
                     "newHeads"
                ],
            }
        }
    }
})



extensionPort.postMessage({
    type: 'caip-x',
    data: {
        "jsonrpc": "2.0",
        method: 'wallet_invokeMethod',
        params: {
            scope: 'eip155:11155111',
            request: {
                "method": "eth_subscribe",
                 "params": [
                     "newHeads"
                ],
            }
        }
    }
})

Screenshots/Recordings

Before

After

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've completed the PR template to the best of my ability
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). 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.

metamaskbot and others added 30 commits July 9, 2024 23:29
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

* Fix wallet namespace handling in provider_request
* Add provider_request spec

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/25709?quickstart=1)

## **Related issues**

Fixes:

## **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**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.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.
NOTE: We may want to get [this child
branch](#25713)
merged into this branch first before making the remaining changes to
accounts behavior


<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

* Checks if accounts specified in the `accounts` property exist in the
Keyring API
* Requests the `eth_accounts` permission using those accounts (makes the
assumption they are evm)
* Removes random property sessions from my initial implementation

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/25708?quickstart=1)

## **Related issues**

Fixes:

## **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**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.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: Shane <[email protected]>
Co-authored-by: Alex <[email protected]>
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/25784?quickstart=1)

## **Related issues**

Fixes:

## **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**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.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.
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**
Currently we don’t believe account validation is necessary since we will
only ever take accounts that are sourced from the keyring.

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/25836?quickstart=1)

## **Related issues**

Fixes:

## **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**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.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.
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/25841?quickstart=1)

## **Related issues**

Fixes:

## **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**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.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.
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

* Add `wallet_getSession`
* Add `wallet_revokeSession`
* Emit `wallet_sessionChanged` on authorization change
* Note this does not include specs. Seems we are not currently testing
accountChanged and chainChanged events and should probably get those
covered first

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/25842?quickstart=1)

## **Related issues**

See: MetaMask/MetaMask-planning#2821

## **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**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.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.
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

Loosen ScopesObject validation to allow empty objects

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/25956?quickstart=1)

## **Related issues**

Fixes:

## **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**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.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.
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

Adds back scope check in provider_request

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/25957?quickstart=1)

## **Related issues**

Fixes:

## **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**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.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.
@jiexi
Copy link
Contributor Author

jiexi commented Oct 30, 2024

TODO: Verify that subscriptions end when scope is removed from session

EDIT: verified. this is not correctly ending subscription when scope is removed from session

dirty (?) fix here dc848dd

…grate-core

# Conflicts:
#	app/scripts/metamask-controller.js
#	lavamoat/browserify/beta/policy.json
#	lavamoat/browserify/flask/policy.json
#	lavamoat/browserify/main/policy.json
#	lavamoat/browserify/mmi/policy.json
#	package.json
#	yarn.lock
@jiexi
Copy link
Contributor Author

jiexi commented Nov 21, 2024

@metamaskbot update-policies

@metamaskbot
Copy link
Collaborator

Policies updated.
👀 Please review the diff for suspicious new powers.

🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff

@metamaskbot
Copy link
Collaborator

❌ Multichain API Spec Test Failed. View the report here.

@metamaskbot
Copy link
Collaborator

Builds ready [426f481]
Page Load Metrics (2221 ± 80 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint27225171927684328
domContentLoaded19112450216217383
load19302524222116680
domInteractive2610042188
backgroundConnect16191634019
firstReactRender933861788742
getState9100413215
initialActions00000
loadScripts13601869159815675
setupStore75211105
uiStartup216031612582251120
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: -17.1 KiB (-0.29%)
  • ui: 601 Bytes (0.01%)
  • common: 227.89 KiB (2.72%)

@metamaskbot
Copy link
Collaborator

Builds ready [eae656b]
Page Load Metrics (1760 ± 44 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint1585195617678340
domContentLoaded1565186017247837
load1573195317609144
domInteractive15189373617
backgroundConnect10153453718
firstReactRender603131357637
getState577242412
initialActions01000
loadScripts1101133412427235
setupStore680172010
uiStartup17642370205017986
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: -17.1 KiB (-0.29%)
  • ui: 601 Bytes (0.01%)
  • common: 228.09 KiB (2.73%)

@jiexi
Copy link
Contributor Author

jiexi commented Nov 22, 2024

@metamaskbot update-policies

@metamaskbot
Copy link
Collaborator

Policies updated.
👀 Please review the diff for suspicious new powers.

🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff

@metamaskbot
Copy link
Collaborator

Builds ready [7b917ec]
Page Load Metrics (1921 ± 57 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint18162341193812259
domContentLoaded1769219218939948
load17812295192111957
domInteractive24233474421
backgroundConnect12138403316
firstReactRender673041325326
getState57317189
initialActions00000
loadScripts1285162113657134
setupStore683172311
uiStartup197727522181209100
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: -8.83 KiB (-0.15%)
  • ui: 601 Bytes (0.01%)
  • common: 228.19 KiB (2.73%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants