Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix quote verifications for USDT (#3168)
# Description #3160 introduced problems with verifying quotes with `USDT` as the sell token. The reason is that `USDT` is not ERC20 compliant and does not return a `bool` from `approve()` as it's supposed to. This then leads to reverts like [this](https://dashboard.tenderly.co/cow-protocol/production/simulator/6042dc35-e2ef-4732-959b-aba737842982) where solidity is not able to decode which function to call afterwards because the previous `approve()` messed up the memory. # Changes Revert back to using `safeApprove()` which handles this case gracefully. Unfortunately we can't use `try-catch` with `safeApprove()` because it's not an `external` function. But that will not make the simulation less correct. It will just cause us to get a suboptimal error message in case one of the approvals actually reverts. ## How to test Added a forked e2e test that verifies a quote with `USDT` as the sell token. This fails without the fix.
- Loading branch information