-
Notifications
You must be signed in to change notification settings - Fork 5.4k
feat: update swap transaction depending on user selection #37528
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 (10 files, +415 -164)
|
Builds ready [0355e59]
UI Startup Metrics (1206 ± 81 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚀 Bundle size reduced!]
|
Builds ready [75538f8]
UI Startup Metrics (1211 ± 88 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
...confirmations/components/confirm/dapp-swap-comparison-banner/dapp-swap-comparison-banner.tsx
Show resolved
Hide resolved
Builds ready [c8fedc9]
UI Startup Metrics (1212 ± 80 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [b7ae186]
UI Startup Metrics (1254 ± 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 [933ebfb]
UI Startup Metrics (1240 ± 97 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
Allow user to select quoted swap.
Changelog
CHANGELOG entry:
Related issues
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/6108
Manual testing steps
Screenshots/Recordings
TODO
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Adds swap selection on the confirmation screen to switch between dapp’s current swap and a MetaMask-quoted swap, updating txParams/batch via remote-flagged UI, with quote detection, metric fixes, tests, and minor styling.
ui/pages/.../dapp-swap-comparison-banner.tsx: Add "Current" vs "Save + Earn" selection; dispatchupdateTransactionto swap between original dapp tx and selected quote (txParams,batchTransactions,txParamsOriginal); auto-select MetaMask when it’s a quoted swap; gate with remote flagdappSwapUi.enabled/threshold; allow test origin; minor style token update inindex.scss.useSwapCheckto detect quoted swaps (diffstxParamsOriginalvstxParams).useDappSwapComparisonInfo: now returnsselectedQuote; reads fromtxParamsOriginalwhen present; refines quote timing; no-op safety tweaks; metric capture ordering updates.useDappSwapComparisonLatencyMetrics: fix quote request latency calculation.EditGasFeesRow: hide edit-gas button whenisQuotedSwapis true; tests added.DAPP_SWAP_SHIELD_ENABLEDfrombuilds.ymland test env.Written by Cursor Bugbot for commit 933ebfb. This will update automatically on new commits. Configure here.