I'm running into some issues trying to swap when specifying buyAmount
. Specifically, I'd like to set my allowance to exactly sellAmount
returned by the API before doing a swap, but I'm getting "ERC20: transfer amount exceeds allowance" errors, suggesting that 0x is swapping more than the sellAmount
returned from the API.
Is the sellAmount
an actual maximum that I can use for allowance setting, or am I unable to depend on it?