-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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: error in navigating between transaction when one of the transaction is approve all #27985
Conversation
…on is approve all
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. |
@@ -174,11 +174,10 @@ const ConfirmTitle: React.FC = memo(() => { | |||
|
|||
let isRevokeSetApprovalForAll = false; | |||
let revokePending = false; | |||
const decodedResponse = useDecodedTransactionData(TransactionType.tokenMethodSetApprovalForAll); |
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.
Reason for the big for that this hook was being called conditionally
DecodedTransactionDataResponse | undefined | ||
> { | ||
export function useDecodedTransactionData( | ||
transactionType?: string, |
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.
To make this more explicit and readable, could we use an object argument call this something like transactionTypeFilter
?
We could also omit the filter completely and always decode but I appreciate this is a nice optimisation.
If we end up with many of usages of this hook, we may want to implement some kind of caching in the underlying background utils, or even move this to the TransactionController
.
Builds ready [14a5895]
Page Load Metrics (2085 ± 85 ms)
Bundle size diffs
|
Description
Navigation in transaction header was broken when one of the transaction is of type Approve All
Related issues
Fixes: #27913
Manual testing steps
Screenshots/Recordings
TODO
Pre-merge author checklist
Pre-merge reviewer checklist