-
Notifications
You must be signed in to change notification settings - Fork 5k
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
fix: remove reliance on transaction decode in confirmations #29341
Conversation
Add useTokenTransactionData hook. Remove all core usages of decode data.
Fix integration tests.
Fix linting.
Builds ready [9678571]
Page Load Metrics (1626 ± 60 ms)
Bundle size diffs
|
@@ -23,6 +26,7 @@ export function useDecodedTransactionData( | |||
|
|||
return useAsyncResult(async () => { | |||
if ( | |||
!isDecodeEnabled || |
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.
For the sake of immediately resolving the privacy regression, is there anything more needed than just the above two lines?
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.
Afraid so, the redesigned confirmations are incorrectly reliant on the advanced decoding meaning they would lose core functionality if it were disabled. Hence the additional changes to use local decoding.
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.
would they lose functionality that was available on the old designs, if decoding was disabled?
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.
Afraid so, fundamental data such as token transfer recipient and approve spending cap.
Builds ready [3644b3e]
Page Load Metrics (1898 ± 76 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
ui/pages/confirmations/components/confirm/info/shared/send-heading/send-heading.tsx
Show resolved
Hide resolved
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.
Great work
Builds ready [3c6dcba]
Page Load Metrics (1578 ± 49 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
Description
Disable all advanced transaction data decoding using Sourcify, 4Byte and Uniswap, if the
Decode smart contracts
toggle is disabled.Remove all reliance on the advanced decoding excluding the
Data
section.Specifically:
useTokenTransactionData
hook to decode all token transactions locally using the ABIs.useDecodedTransactionData
with the new hook, except for theTransactionData
component.Related issues
Manual testing steps
Regression of redesigned transaction confirmations.
Specifically:
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist