1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00
This commit is contained in:
白宦成 2021-11-12 22:40:50 +08:00 committed by GitHub
parent 4779bd9fe5
commit 4ef7162656
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -280,7 +280,7 @@ export default class SwapsController {
// For a user to be able to swap a token, they need to have approved the MetaSwap contract to withdraw that token.
// _getERC20Allowance() returns the amount of the token they have approved for withdrawal. If that amount is greater
// than 0, it means that approval has already occured and is not needed. Otherwise, for tokens to be swapped, a new
// than 0, it means that approval has already occurred and is not needed. Otherwise, for tokens to be swapped, a new
// call of the ERC-20 approve method is required.
approvalRequired =
allowance.eq(0) &&