-
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
"Approve" confirmation says "Unlimited" even though it's not #11125
Comments
See also: ethereum/EIPs#717 |
To reproduce using https://metamask.github.io/test-dapp/:
You should now see it say "Unlimited" I believe this is what appens when the requested approval amount is greater than the users current token balance. |
@danjm Can you please tell us when showing the Unlimited label is correct? |
@danjm in your scenario above we need to have screen as below? |
I'd say this:
|
Sorry, I was confused on that one. "Unlimited" is only in case of MAX_UINT, not in case of zero - as that is actually zero (i.e. withdraw allowance) Source: |
Yeah, this: Proposed Approval Limit is when: Unlimited is when: |
Describe the bug
Follow-up to MetaMask/Design#38 and in specific this comment by @pi0neerpat MetaMask/Design#38 (comment) as @Gudahtt requested to open a new issue.
I encountered that MetaMask would show "Unlimited" even though I requested a specific (small) amount:
Only in case of requesting
0
it would show the expected "Proposed Approval Limit":Steps to reproduce
Steps to reproduce the behavior, libraries used with version number, and/or any setup information to easily reproduce:
tokenContract.approve(spenderAddress, BigNumber.from(ethers.constants.WeiPerEther))
Expected behavior
Show "Proposed Approval Limit" UI except when the amount is the maximum uint265 amount
1.157...e+59
Browser details (please complete the following information):
The text was updated successfully, but these errors were encountered: