-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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: Display alerts on add network request if there are pending confirmations #30634
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. |
Builds ready [1730a64]
Page Load Metrics (1750 ± 73 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [bb8e799]
Page Load Metrics (1838 ± 86 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
app/scripts/lib/rpc-method-middleware/handlers/ethereum-chain-utils.js
Outdated
Show resolved
Hide resolved
ui/components/app/alert-system/multiple-alert-modal/multiple-alert-modal.tsx
Outdated
Show resolved
Hide resolved
ui/components/app/alert-system/multiple-alert-modal/multiple-alert-modal.test.tsx
Show resolved
Hide resolved
ui/pages/confirmations/confirmation/alerts/useAddEthereumChainAlerts.test.ts
Outdated
Show resolved
Hide resolved
ui/pages/confirmations/confirmation/alerts/useAddEthereumChainAlerts.ts
Outdated
Show resolved
Hide resolved
ui/pages/confirmations/confirmation/alerts/useAlertsActions.tsx
Outdated
Show resolved
Hide resolved
Builds ready [6bd09fb]
Page Load Metrics (1721 ± 72 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
* @param origin - Origin to ger approvals from. | ||
* @returns array of approvals from an origin | ||
*/ | ||
export const getApprovalsByOrigin = (state, origin) => { |
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.
Minor, but we try and name selectors using selectX
to make it explicit they are selectors and not utils.
Also, should we avoid adding to the legacy selectors.js
and maybe use ui/selectors/approvals.ts
?
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.
I will update this in following PR
@@ -6035,7 +6035,7 @@ export default class MetamaskController extends EventEmitter { | |||
engine.push(createSelectedNetworkMiddleware(this.controllerMessenger)); | |||
|
|||
// Add a middleware that will switch chain on each request (as needed) | |||
if (!process.env.EVM_MULTICHAIN_ENABLED) { | |||
if (process.env.EVM_MULTICHAIN_ENABLED !== true) { |
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.
Minor, does this mean we can also remove the ENV for each build type?
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.
I remember it created trouble with build. Let me experiment in next PR.
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.
I just tried it in next pr @matthewwalsh0 and it caused CI to break:

Description
Add confirmation reject warning when user adds a new network. As user confirms the warning pending confirmations are deleted.
Related issues
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/4292
Manual testing steps
EVM_MULTICHAIN_ENABLED
Screenshots/Recordings
Uploading Screen Recording 2025-02-28 at 4.30.58 PM.mov…
Pre-merge author checklist
Pre-merge reviewer checklist