-
Notifications
You must be signed in to change notification settings - Fork 965
fix: display 'unlimited' for max approval amount #17550
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: display 'unlimited' for max approval amount #17550
Conversation
7cd32f1
to
b1c1088
Compare
A Storybook has been deployed to preview UI for the latest push |
@@ -78,6 +79,8 @@ export const usePendingTransactions = () => { | |||
]) | |||
const [baseFeePerGas, setBaseFeePerGas] = React.useState<string>(transactionGasEstimates?.baseFeePerGas || '') | |||
const [currentTokenAllowance, setCurrentTokenAllowance] = React.useState<string>('') | |||
const [isCurrentAllowanceUnlimited, setIsCurrentAllowanceUnlimited] = |
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.
Does this need to be an additional state vs a memo based on currentTokenAllowance
?
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.
I'll refactor this to use less state
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.
refactored
b1c1088
to
4e24a90
Compare
A Storybook has been deployed to preview UI for the latest push |
0ecdfcd
to
97427b0
Compare
A Storybook has been deployed to preview UI for the latest push |
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.
++
97427b0
to
4c668f0
Compare
A Storybook has been deployed to preview UI for the latest push |
4c668f0
to
269284d
Compare
269284d
to
1e39bf6
Compare
A Storybook has been deployed to preview UI for the latest push |
Resolves brave/brave-browser#23666
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
wikinpm run lint
,npm run presubmit
wiki,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan:
It should instead read "Unlimited ". For any other amount less than MAX_UNINT256, it should rendered as usual.
Before:
Screen.Recording.2023-03-09.at.4.37.07.PM.mov
After:
Screen.Recording.2023-03-09.at.5.02.55.PM.mov