You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure why there's a check there for UniswapVersion.v3, but seems like this line causes output trades on Uniswap V2 to fail with EXCESSIVE_INPUT_AMOUNT because it subtracts the slippage, resulting in an amountInMax value lower than the expected amount.
Did you find a work around yet? I'm stuck with the same issue. If I change the value in second input (Exact out), the transaction data's "amountInMax" is less than "expectedConvertQuote".
Hence I'm stuck with this error :
However when I manually tried to increase the value of "amountInMax" it works.
@tyleung Thanks for the comment. I'm new to modifying things on node_modules directly. Can you suggest me how did you edit the file and added it into your project? When I forked and added the project, there is no "dist" file in node_modules.
I found a potential bug in the code used to get the amountInMax:
https://github.com/uniswap-integration/simple-uniswap-sdk/blob/1629b680e615ce9851a4f7e7a3ba0187beac8261/src/factories/router/uniswap-router.factory.ts#L1935
Not sure why there's a check there for
UniswapVersion.v3
, but seems like this line causes output trades on Uniswap V2 to fail with EXCESSIVE_INPUT_AMOUNT because it subtracts the slippage, resulting in an amountInMax value lower than the expected amount.Probably related to issue: #28
The text was updated successfully, but these errors were encountered: