-
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: Do not break application if no token details are found using getTokenStandardAndDetails #26324
fix: Do not break application if no token details are found using getTokenStandardAndDetails #26324
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. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #26324 +/- ##
========================================
Coverage 69.97% 69.97%
========================================
Files 1422 1422
Lines 49938 49937 -1
Branches 13861 13861
========================================
Hits 34943 34943
+ Misses 14995 14994 -1 ☔ View full report in Codecov by Sentry. |
}); | ||
}; | ||
|
||
getDecimals(); |
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.
Since PR is refactoring this useeffect, it may be useful to use this hook I think to avoid race conditions:
https://github.com/MetaMask/metamask-extension/blob/develop/ui/hooks/useAsyncResult.ts
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.
conversation continued below #26324 (comment)
Builds ready [edf1542]
Page Load Metrics (524 ± 366 ms)
Bundle size diffs
|
Builds ready [40e1cd1]
Page Load Metrics (371 ± 299 ms)
Bundle size diffs
|
@@ -11,6 +11,7 @@ import { getTokenStandardAndDetails } from '../../../../../store/actions'; | |||
|
|||
import { Box } from '../../../../../components/component-library'; | |||
import { BlockSize } from '../../../../../helpers/constants/design-system'; | |||
import * as hookModule from '../../../../../hooks/useAsyncResult'; |
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.
Minor, but why the as
import?
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.
Nice catch! Missed this when I was copying over the import from another test file. Updated d4e60ac
8a411d0
Thanks for the reviews! Made an update and reverted an unnecessary snapshot update. May I get re-approvals here please? @matthewwalsh0 @vinistevam @jpuri |
Quality Gate passedIssues Measures |
Builds ready [2e94356]
Page Load Metrics (317 ± 306 ms)
Bundle size diffs
|
Description
Upon further observation and while work on test cases with varying mock data, I found code improvements and, I believe, fixes related to the Permit code.
Related issues
Related to: #25410
Related to: #26107
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist