MetaMask / MetaMask/metamask-extension
Clean up TokenAllowance customPermissionAmount prop. It should be 1 type instead of string or number
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
### Describe the bug
Currently in the TokenAllowance component, the `customPermissionAmount` prop may be set to the value 0 as a string or a number. We should expect a consistent type.,
### Steps to reproduce
1. https://metamask.github.io/test-dapp/
2. Send Tokens > Create Tokens > Approve Tokens
3. Inspect `customPermissionAmount` variable
### Error messages or log output
_No response_
### Version
11.0
### Build type
None
### Browser
Chrome
### Operating system
MacOS
### Hardware wallet
_No response_
### Additional context
_No response_
Contributor guide
Research direction
Locate the TokenAllowance component and search its usages for customPermissionAmount, then inspect the Approve Tokens flow in the linked test dapp. Done means the prop has one consistent type rather than accepting both string and number values, with any relevant checks or tests updated accordingly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100