-
Notifications
You must be signed in to change notification settings - Fork 5.2k
fix: Fix race condition in send flow validation for token balance check #33172
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
Open
vinistevam
wants to merge
5
commits into
main
Choose a base branch
from
fix/btn-submit-send
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+191
−13
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 (2 files, +185 -9)
🖥️ @MetaMask/wallet-ux (3 files, +187 -11)
|
Builds ready [5728779]
UI Startup Metrics (1215 ± 63 ms)
Benchmark value 38 exceeds gate value 32 for chrome webpack home mean setupStore Benchmark value 296 exceeds gate value 65 for chrome webpack home p95 setupStore Benchmark value 35 exceeds gate value 24 for firefox browserify home p95 getState Benchmark value 39 exceeds gate value 38 for firefox webpack home mean firstReactRender Benchmark value 1976 exceeds gate value 1935 for firefox webpack home p95 uiStartup Sum of mean exceeds: 7ms | Sum of p95 exceeds: 291ms Sum of all benchmark exceeds: 298ms Bundle size diffs
|
Builds ready [57fad2e]
UI Startup Metrics (1210 ± 62 ms)
Benchmark value 39 exceeds gate value 32 for chrome webpack home mean setupStore Benchmark value 2459 exceeds gate value 2454 for chrome webpack home p95 uiStartup Benchmark value 296 exceeds gate value 65 for chrome webpack home p95 setupStore Benchmark value 216 exceeds gate value 195 for firefox browserify home p95 domInteractive Benchmark value 1476 exceeds gate value 1475 for firefox browserify home p95 loadScripts Benchmark value 30 exceeds gate value 27 for firefox browserify home p95 setupStore Benchmark value 41 exceeds gate value 38 for firefox webpack home mean firstReactRender Sum of mean exceeds: 10ms | Sum of p95 exceeds: 265ms Sum of all benchmark exceeds: 275ms Bundle size diffs
|
57fad2e
to
41462e0
Compare
Builds ready [11f0918]
UI Startup Metrics (1216 ± 60 ms)
Benchmark value 2204 exceeds gate value 2192 for chrome webpack home mean uiStartup Benchmark value 1713 exceeds gate value 1711 for chrome webpack home mean load Benchmark value 1706 exceeds gate value 1704 for chrome webpack home mean domContentLoaded Benchmark value 1703 exceeds gate value 1699 for chrome webpack home mean loadScripts Benchmark value 43 exceeds gate value 32 for chrome webpack home mean setupStore Benchmark value 2641 exceeds gate value 2454 for chrome webpack home p95 uiStartup Benchmark value 311 exceeds gate value 65 for chrome webpack home p95 setupStore Benchmark value 37 exceeds gate value 24 for firefox browserify home p95 getState Benchmark value 39 exceeds gate value 38 for firefox webpack home mean firstReactRender Sum of mean exceeds: 32ms | Sum of p95 exceeds: 451ms Sum of all benchmark exceeds: 483ms Bundle size diffs
|
Builds ready [f494991]
UI Startup Metrics (1210 ± 79 ms)
Benchmark value 38 exceeds gate value 32 for chrome webpack home mean setupStore Benchmark value 2511 exceeds gate value 2454 for chrome webpack home p95 uiStartup Benchmark value 308 exceeds gate value 65 for chrome webpack home p95 setupStore Benchmark value 26 exceeds gate value 25 for firefox browserify home mean firstReactRender Sum of mean exceeds: 7ms | Sum of p95 exceeds: 308ms Sum of all benchmark exceeds: 315ms Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [eaf77f2]
UI Startup Metrics (1210 ± 75 ms)
Benchmark value 34 exceeds gate value 32 for chrome webpack home mean setupStore Benchmark value 297 exceeds gate value 65 for chrome webpack home p95 setupStore Benchmark value 12 exceeds gate value 11 for firefox browserify home mean getState Benchmark value 39 exceeds gate value 38 for firefox webpack home mean firstReactRender Sum of mean exceeds: 4ms | Sum of p95 exceeds: 238ms Sum of all benchmark exceeds: 242ms Bundle size diffs
|
pedronfigueiredo
approved these changes
May 27, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR addresses a race condition in the send flow where users could bypass the token balance validation by quickly inputting an amount and proceeding to the confirmation screen.
Key changes include:
Related issues
Fixes: #33062
Manual testing steps
Screenshots/Recordings
Screencast.from.2025-05-27.08-20-01.webm
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist