fix: nonce increment/decrement functionality using arrow buttons#26569
fix: nonce increment/decrement functionality using arrow buttons#26569vinistevam merged 12 commits intodevelopfrom
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. |
| ); | ||
| }; | ||
|
|
||
| const handleNonceChange = ({ target: { value } }) => { |
There was a problem hiding this comment.
Minor, do we want a useCallback just in case?
There was a problem hiding this comment.
100% we need to use the usaCallback, but in this case, it is an old class component.
| const inputValue = Number(value); | ||
|
|
||
| if (inputValue < 0 || isNaN(inputValue)) { | ||
| updateCustomNonce(''); |
There was a problem hiding this comment.
Would it be cleaner to set this to undefined to be explicit as we already have the fallback on 533?
| return; | ||
| } | ||
|
|
||
| updateCustomNonce(String(inputValue)); |
There was a problem hiding this comment.
Assuming the inputValue is a decimal and not hexadecimal, why are we storing it as a string?
There was a problem hiding this comment.
Good point, no need to store it as a string, removed.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #26569 +/- ##
===========================================
+ Coverage 70.13% 70.13% +0.01%
===========================================
Files 1424 1424
Lines 49567 49571 +4
Branches 13867 13867
===========================================
+ Hits 34759 34765 +6
+ Misses 14808 14806 -2 ☔ View full report in Codecov by Sentry. |
Builds ready [2e30805]
Page Load Metrics (90 ± 9 ms)
Bundle size diffs
|
|
Works great! increments.mov |
Builds ready [8cbf8be]
Page Load Metrics (83 ± 13 ms)
Bundle size diffs
|
|
Builds ready [a9b1358]
Page Load Metrics (1884 ± 91 ms)
Bundle size diffs
|



Description
Context
When customizing the nonce using a lower increment button nonce value is set to 0, using higher increment button results in nonce = 1.
This PR aims to fix the support of the arrow buttons to increase/decrease the number taking the suggested next nonce as the base.
Related issues
Fixes: #23535
Manual testing steps
Screenshots/Recordings
Before
After
Screencast.from.21-08-2024.10.42.17.webm
Pre-merge author checklist
Pre-merge reviewer checklist