-
Notifications
You must be signed in to change notification settings - Fork 5.4k
chore: Refactor to remove warnings in confirmations' confirm.test.tsx
#37431
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
base: main
Are you sure you want to change the base?
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. |
f40a9a7 to
e372f77
Compare
✨ Files requiring CODEOWNER review ✨✅ @MetaMask/confirmations (6 files, +422 -389)
🔐 @MetaMask/web3auth (1 files, +6 -5)
|
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Results generated automatically by MetaMask CI |
Builds ready [e372f77]
UI Startup Metrics (1287 ± 92 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
| expect(container).toMatchSnapshot(); | ||
| }); | ||
| const signatureRender = await renderConfirm(mockStoreSign); | ||
| expect(signatureRender.container).toMatchSnapshot(); |
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.
Nice cleanup
d3195ef to
0ecfcf5
Compare
Builds ready [0ecfcf5]
UI Startup Metrics (1275 ± 96 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [c4149da]
UI Startup Metrics (1320 ± 110 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [8a30e82]
UI Startup Metrics (1272 ± 91 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
8a30e82 to
abbd8bf
Compare
abbd8bf to
7f54bf7
Compare
Builds ready [7f54bf7]
UI Startup Metrics (1217 ± 102 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
forwarded upstream data:
Collectively these changes mean Reselect’s dev-mode checks now recognise actual transformations—the warnings are gone because selectors either generate fresh data or expose memoized helpers directly, rather than returning the same reference they were given.
Changelog
CHANGELOG entry:
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Refactors confirmation flow and shared selectors for proper memoization/value normalization and updates tests (async render + background stub), eliminating Reselect dev warnings and refreshing snapshots.
selectConfirmationData; refactoruseCurrentConfirmationto use it; addpendingConfirmations*selectors; exposeoldestPendingConfirmationSelector.getTransactions,getUnapprovedTransactions,getApprovedAndSignedTransactions,submittedPendingTransactionsSelector, etc.); remove redundant wrappers; guard empty cases.getPendingApprovals,pendingApprovalsSortedSelector,getInternalAccounts); simplifyselectPendingApproval/selectUnapprovedMessage.getUnapprovedTransactionto return a cloned item; expose existing selectors (getMemoizedMetaMaskInternalAccounts,selectERC20TokensByChain).boolean|null; keep default-enabled logic ingetSmartTransactionsPreferenceEnabled.act, flush promises, factorrenderConfirm, update snapshots.useNonContractAddressAlertsanduseAutomaticGasFeeTokenSelecttests to provider-based helpers; add store update helper; stabilize mocks.clearAllMocksand adjust spies.Written by Cursor Bugbot for commit 7f54bf7. This will update automatically on new commits. Configure here.