Skip to content

fix: cp-12.17.3 support permit2 approvals in batch simulation #32733

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

Merged
merged 6 commits into from
May 12, 2025

Conversation

matthewwalsh0
Copy link
Member

@matthewwalsh0 matthewwalsh0 commented May 9, 2025

Description

Include Permit2 approvals in batch simulation changes.

In addition:

  • Fix incorrect Unlimited label.
  • Show loader in Edit Spending Cap Modal to prevent temporary token ID display.

Open in GitHub Codespaces

Related issues

Fixes: #4847 #4846

Manual testing steps

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@metamaskbot metamaskbot added the team-confirmations Push issues to confirmations team label May 9, 2025
Copy link

sentry-io bot commented May 9, 2025

🔍 Existing Issues For Review

Your pull request is modifying functions with the following pre-existing issues:

📄 File: ui/pages/confirmations/components/confirm/info/approve/edit-spending-cap-modal/edit-spending-cap-modal.tsx

Function Unhandled Issue
handleSubmit Error: Invalid data /notification.html
Event Count: 3 Affected Users: 0

Did you find this useful? React with a 👍 or 👎

@metamaskbot
Copy link
Collaborator

metamaskbot commented May 9, 2025

✨ Files requiring CODEOWNER review ✨

✅ @MetaMask/confirmations

  • ui/pages/confirmations/components/confirm/info/approve/edit-spending-cap-modal/__snapshots__/edit-spending-cap-modal.test.tsx.snap
  • ui/pages/confirmations/components/confirm/info/approve/edit-spending-cap-modal/edit-spending-cap-modal.test.tsx
  • ui/pages/confirmations/components/confirm/info/approve/edit-spending-cap-modal/edit-spending-cap-modal.tsx
  • ui/pages/confirmations/components/confirm/info/approve/hooks/use-approve-token-simulation.test.ts
  • ui/pages/confirmations/components/confirm/info/approve/hooks/use-approve-token-simulation.ts
  • ui/pages/confirmations/components/confirm/info/batch/batch-simulation-details/batch-simulation-details.test.tsx
  • ui/pages/confirmations/components/confirm/info/hooks/useBatchApproveBalanceChanges.test.ts
  • ui/pages/confirmations/components/confirm/info/hooks/useBatchApproveBalanceChanges.ts

@metamaskbot
Copy link
Collaborator

Builds ready [0001c3f]
UI Startup Metrics (1221 ± 73 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1221107714667312641361
load106994112976811131177
domContentLoaded106293312916811091170
domInteractive16132731624
firstPaint69874130243010811147
backgroundConnect74284720
firstReactRender20146972036
getState1463371928
initialActions001001
loadScripts81969798964862923
setupStore74152812
WebpackHomeuiStartup21701758252818123032417
load16811350197713417791858
domContentLoaded16741346195513317711854
domInteractive161258101349
firstPaint1596343557175277
backgroundConnect2910203223661
firstReactRender17854357111304347
getState174308311641
initialActions316135
loadScripts16691344193113317661852
setupStore216270312134
FirefoxBrowserifyHomeuiStartup13641202173210514231568
load1215106315479912691398
domContentLoaded1215106215469912691398
domInteractive993718228115149
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2214147152141
firstReactRender24205672340
getState75132811
initialActions001001
loadScripts1196104315339812501381
setupStore9420521733
WebpackHomeuiStartup15261358185111015951738
load13121177162510313931519
domContentLoaded13111177162410313931519
domInteractive80381331988123
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2314104132343
firstReactRender35294943643
getState94668930
initialActions001011
loadScripts12921160160710313761500
setupStore85233814
Benchmark value 1063 exceeds gate value 1061 for chrome browserify home mean domContentLoaded
Benchmark value 20 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 10 exceeds gate value 9 for firefox browserify home mean setupStore
Benchmark value 33 exceeds gate value 27 for firefox browserify home p95 setupStore
Sum of mean exceeds: 3ms | Sum of p95 exceeds: 8ms
Sum of all benchmark exceeds: 11ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0%)
  • ui: 1.33 KiB (0.02%)
  • common: 308 Bytes (0%)

@metamaskbot
Copy link
Collaborator

❌ API Spec Test Failed. View the report here.

@metamaskbot
Copy link
Collaborator

Builds ready [3ce2b50]
UI Startup Metrics (1264 ± 61 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1264113814746113011352
load110498812646311521211
domContentLoaded109896912566411431204
domInteractive17144041726
firstPaint659144125645611261188
backgroundConnect84426825
firstReactRender20153932227
getState16686102029
initialActions001001
loadScripts850734101261899955
setupStore85152811
WebpackHomeuiStartup21531739251517922832365
load16711327208414417651907
domContentLoaded16631323206914217581840
domInteractive161174111347
firstPaint1736138662210303
backgroundConnect3110238303357
firstReactRender16654376106282348
getState184329361541
initialActions318135
loadScripts16581322204514117521837
setupStore186184182135
FirefoxBrowserifyHomeuiStartup13901203192611914361629
load12361071177411012891431
domContentLoaded12361071177311012891430
domInteractive1034029231115146
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect20136072134
firstReactRender24206262434
getState10424524811
initialActions002001
loadScripts12181057176010912701415
setupStore6437469
WebpackHomeuiStartup16051442211514116601983
load13841207181312614601659
domContentLoaded13841207181212614601658
domInteractive83372702790127
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect241681102543
firstReactRender35295143746
getState1053361030
initialActions001011
loadScripts13631192179712614351634
setupStore85344813
cc: @HowardBraham
Benchmark value 1265 exceeds gate value 1234 for chrome browserify home mean uiStartup
Benchmark value 1105 exceeds gate value 1070 for chrome browserify home mean load
Benchmark value 1098 exceeds gate value 1061 for chrome browserify home mean domContentLoaded
Benchmark value 16 exceeds gate value 15 for chrome browserify home mean getState
Benchmark value 851 exceeds gate value 830 for chrome browserify home mean loadScripts
Benchmark value 1211 exceeds gate value 1190 for chrome browserify home p95 load
Benchmark value 1205 exceeds gate value 1180 for chrome browserify home p95 domContentLoaded
Benchmark value 1189 exceeds gate value 1180 for chrome browserify home p95 firstPaint
Benchmark value 25 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 956 exceeds gate value 940 for chrome browserify home p95 loadScripts
Benchmark value 1384 exceeds gate value 1380 for firefox webpack home mean load
Benchmark value 1384 exceeds gate value 1380 for firefox webpack home mean domContentLoaded
Benchmark value 1364 exceeds gate value 1360 for firefox webpack home mean loadScripts
Benchmark value 1983 exceeds gate value 1935 for firefox webpack home p95 uiStartup
Benchmark value 1634 exceeds gate value 1630 for firefox webpack home p95 loadScripts
Sum of mean exceeds: 137ms | Sum of p95 exceeds: 130ms
Sum of all benchmark exceeds: 267ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 18 Bytes (0%)
  • ui: 1.59 KiB (0.02%)
  • common: 1.09 KiB (0.01%)

@metamaskbot
Copy link
Collaborator

Builds ready [2f6270f]
UI Startup Metrics (1191 ± 70 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1191104013797012361314
load104291112116410801170
domContentLoaded103690812046510741163
domInteractive16123441624
firstPaint71798121042010661143
backgroundConnect84385821
firstReactRender18145151926
getState1254371724
initialActions002001
loadScripts79968695063833914
setupStore75152811
WebpackHomeuiStartup21681770267718022912443
load16871331207513917651923
domContentLoaded16801328207213717571911
domInteractive161167111347
firstPaint1626431553189277
backgroundConnect309234303376
firstReactRender17755369109298350
getState144168181528
initialActions317134
loadScripts16751326207013617511886
setupStore207289342033
FirefoxBrowserifyHomeuiStartup13571189179612014151605
load12071042164211212621433
domContentLoaded12071041164211212621433
domInteractive1033819530120164
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2313194202148
firstReactRender23205452229
getState9416516824
initialActions004101
loadScripts11871017162811012371379
setupStore11434838615
WebpackHomeuiStartup16141414207415316921958
load13801208186214614381713
domContentLoaded13801208186114614371713
domInteractive80351501985121
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2717333312540
firstReactRender38306054048
getState1054051029
initialActions102111
loadScripts13561192184114314141689
setupStore15530340927
Benchmark value 21 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 12 exceeds gate value 9 for firefox browserify home mean setupStore
Benchmark value 1381 exceeds gate value 1380 for firefox webpack home mean load
Benchmark value 27 exceeds gate value 26 for firefox webpack home mean backgroundConnect
Benchmark value 15 exceeds gate value 13 for firefox webpack home mean setupStore
Benchmark value 1958 exceeds gate value 1935 for firefox webpack home p95 uiStartup
Benchmark value 1713 exceeds gate value 1660 for firefox webpack home p95 load
Benchmark value 1713 exceeds gate value 1660 for firefox webpack home p95 domContentLoaded
Benchmark value 1689 exceeds gate value 1630 for firefox webpack home p95 loadScripts
Sum of mean exceeds: 7ms | Sum of p95 exceeds: 191ms
Sum of all benchmark exceeds: 198ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 18 Bytes (0%)
  • ui: 1.66 KiB (0.02%)
  • common: 1.09 KiB (0.01%)

@matthewwalsh0 matthewwalsh0 marked this pull request as ready for review May 9, 2025 17:50
@matthewwalsh0 matthewwalsh0 requested a review from a team as a code owner May 9, 2025 17:50
@matthewwalsh0 matthewwalsh0 changed the title fix: support permit2 approvals in batch simulation fix: cp-12.17.3 support permit2 approvals in batch simulation May 9, 2025
@matthewwalsh0 matthewwalsh0 force-pushed the fix/batch-approvals-permit2 branch from cb7a92b to 72ece67 Compare May 9, 2025 17:59
@metamaskbot
Copy link
Collaborator

Builds ready [72ece67]
UI Startup Metrics (1243 ± 78 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1243110614167812991395
load108995912727811451243
domContentLoaded108294712647911401234
domInteractive17144541625
firstPaint668135127344410841222
backgroundConnect94296923
firstReactRender20154762035
getState15595111929
initialActions001000
loadScripts840713100777892990
setupStore85202811
WebpackHomeuiStartup22451765254915823542459
load17311357218013518171887
domContentLoaded17231353217213518091882
domInteractive171263111445
firstPaint1576358671176292
backgroundConnect349385393859
firstReactRender20755367106311345
getState15485101827
initialActions317146
loadScripts17161352215213218041880
setupStore257232322640
FirefoxBrowserifyHomeuiStartup13761193204112614261631
load12241070173710812651450
domContentLoaded12241069173710812651449
domInteractive1023627333116156
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2414151192149
firstReactRender24195862430
getState95657820
initialActions001001
loadScripts12041047171510712491396
setupStore9418019613
WebpackHomeuiStartup15931372218914616411857
load13701179189713014271608
domContentLoaded13701179189613014271607
domInteractive84602862790129
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect21134352232
firstReactRender35296353844
getState13537036930
initialActions002111
loadScripts13511165187912914071584
setupStore85596812
cc: @HowardBraham
Benchmark value 1244 exceeds gate value 1234 for chrome browserify home mean uiStartup
Benchmark value 1090 exceeds gate value 1070 for chrome browserify home mean load
Benchmark value 1082 exceeds gate value 1061 for chrome browserify home mean domContentLoaded
Benchmark value 841 exceeds gate value 830 for chrome browserify home mean loadScripts
Benchmark value 1395 exceeds gate value 1365 for chrome browserify home p95 uiStartup
Benchmark value 1244 exceeds gate value 1190 for chrome browserify home p95 load
Benchmark value 1235 exceeds gate value 1180 for chrome browserify home p95 domContentLoaded
Benchmark value 1222 exceeds gate value 1180 for chrome browserify home p95 firstPaint
Benchmark value 24 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 990 exceeds gate value 940 for chrome browserify home p95 loadScripts
Benchmark value 2245 exceeds gate value 2192 for chrome webpack home mean uiStartup
Benchmark value 1732 exceeds gate value 1711 for chrome webpack home mean load
Benchmark value 1724 exceeds gate value 1704 for chrome webpack home mean domContentLoaded
Benchmark value 1716 exceeds gate value 1699 for chrome webpack home mean loadScripts
Benchmark value 2460 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Sum of mean exceeds: 173ms | Sum of p95 exceeds: 243ms
Sum of all benchmark exceeds: 416ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0%)
  • ui: 1.49 KiB (0.02%)
  • common: 319 Bytes (0%)

@HowardBraham HowardBraham added this pull request to the merge queue May 12, 2025
Merged via the queue into main with commit 77e2574 May 12, 2025
163 checks passed
@HowardBraham HowardBraham deleted the fix/batch-approvals-permit2 branch May 12, 2025 18:21
@github-actions github-actions bot locked and limited conversation to collaborators May 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.19.0 team-confirmations Push issues to confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants