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. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Builds ready [f024598]
⚡ Performance Benchmarks (Total: 🟢 18 pass · 🟡 0 warn · 🔴 0 fail)
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
|
Builds ready [8e8206a]
⚡ Performance Benchmarks (Total: 🟢 6 pass · 🟡 12 warn · 🔴 0 fail)
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|




Description
The bug hasn't been reproducible nor do the sentry errors lead to the reason why
accountIdByAddresswould beundefined, nonetheless a fallback has been added as a defense mechanism.Changelog
CHANGELOG entry: null
Related issues
Fixes: #41441
Manual testing steps
N/A
Screenshots/Recordings
N/A
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Low risk: selector now defensively falls back to an immutable
EMPTY_OBJECTwhenaccountIdByAddressis missing, avoiding crashes and unnecessary recomputation; no business logic changes beyond this fallback.Overview
Adds a defensive fallback in
getAccountIdByAddress(ui/selectors/accounts.ts) to return an immutableEMPTY_OBJECTwhenstate.metamask.accountIdByAddressisundefined.This prevents
getInternalAccountByAddress(and other downstreamcreateSelectorconsumers) from breaking or recomputing due to unstable/undefined references, with a small import cleanup to support the new constant.Reviewed by Cursor Bugbot for commit 8e8206a. Bugbot is set up for automated code reviews on this repo. Configure here.