-
Notifications
You must be signed in to change notification settings - Fork 5.4k
fix: UI issues in DAPP shield #37784
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
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. |
✨ Files requiring CODEOWNER review ✨✅ @MetaMask/confirmations (11 files, +125 -31)
|
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.
Bug: UI Mismatch: MetaMask Swap vs. Market Rate
Removing the useEffect that syncs selectedSwapType with isQuotedSwap causes the UI to incorrectly display "Market rate" as selected when the transaction has already been updated to use the MetaMask quote. When a user selects MetaMask Swap and the transaction is updated with txParamsOriginal, the component will show the wrong button as selected if it remounts or the page refreshes, creating a mismatch between the actual transaction state and the displayed UI state.
ui/pages/confirmations/components/confirm/dapp-swap-comparison-banner/dapp-swap-comparison-banner.tsx#L108-L113
Lines 108 to 113 in c1d8064
| const hideDappSwapComparisonBanner = useCallback(() => { | |
| setShowDappSwapComparisonBanner(false); | |
| }, [setShowDappSwapComparisonBanner]); | |
| const updateSwapToCurrent = useCallback(() => { |
...confirmations/components/confirm/dapp-swap-comparison-banner/dapp-swap-comparison-banner.tsx
Show resolved
Hide resolved
Builds ready [40c0b7d]
UI Startup Metrics (1229 ± 90 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
…tamask-extension into dapp_shield_ui_fixes
Builds ready [72b8e2b]
UI Startup Metrics (1252 ± 84 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [d60faaf]
UI Startup Metrics (1183 ± 121 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
UI fixesin DAPP Shield functionlity.
Changelog
CHANGELOG entry:
Related issues
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/6252
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/6256
Manual testing steps
Screenshots/Recordings
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Introduces quote-swap simulation details with savings highlight and tooltip, updates the Dapp Swap banner to use Market rate, and hides origin/recipient rows for quoted swaps with corresponding i18n and tests.
QuoteSwapSimulationDetailsshowing outgoing/incoming balance changes and a highlighted "Get $X more" savings banner; includes header tooltip viabestQuoteTooltip.metamaskRatetomarketRate; remove auto-switch logic; wire selected quote to transaction update; minor styling import.OriginandRecipientrows, and batch approve simulation, for quoted swaps; add guard whentxParamsmissing.titleTooltip.bestQuoteTooltip,getDollarMore,marketRate; removemetamaskRatein en/en_GB.Written by Cursor Bugbot for commit d60faaf. This will update automatically on new commits. Configure here.