-
Notifications
You must be signed in to change notification settings - Fork 5k
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: fix granted permissions when adding an existing network via wallet_addEthereumChain
#29837
fix: fix granted permissions when adding an existing network via wallet_addEthereumChain
#29837
Conversation
…hPermissionControllerConnectedToTestDappWithChains
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. |
wallet_addEthereumChain
Builds ready [9097ee2]
Page Load Metrics (2286 ± 92 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [fcc79fc]
Page Load Metrics (1893 ± 92 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
Builds ready [11f009f]
Page Load Metrics (1794 ± 92 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
Co-authored-by: Alex Donesky <[email protected]>
Co-authored-by: Alex Donesky <[email protected]>
…s-add-ethereum-chain' into jl/mmp-3814/fix-grant-permissions-add-ethereum-chain
…s-add-ethereum-chain' into jl/mmp-3814/fix-grant-permissions-add-ethereum-chain
); | ||
}); | ||
|
||
it('automatically switches to the chain when the rpc endpoint being added already exists for the chain', async function () { |
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.
Will just highlight the case that (I think) we're missing here, which I've manually tested is, if the rpcEndpoint exists but is not currently the selected rpcEndpoint,, but the chain is selected
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.
agreed
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.
Add missing test case here: #29885
app/scripts/lib/rpc-method-middleware/handlers/ethereum-chain-utils.js
Outdated
Show resolved
Hide resolved
Builds ready [6b5c973]
Page Load Metrics (1598 ± 58 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Above PR has been merged and brought into this branch |
Builds ready [b1b2f8e]
Page Load Metrics (1872 ± 108 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
Add missing test case
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.
LGTM
Builds ready [a686e2b]
Page Load Metrics (1681 ± 74 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
Builds ready [060a6cd]
Page Load Metrics (1752 ± 77 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
Description
Fixes bug with the automatically permittedChains permission grant when triggered via wallet_addEthereumChain in certain scenarios. See ticket for details.
Related issues
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/3814
Manual testing steps
endowment:permitted-chains
permission for the recently added chain viawallet_getPermissions
endowment:permitted-chains
permission for the recently added chain viawallet_getPermissions
endowment:permitted-chains
permission for the recently added chain viawallet_getPermissions
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist