I am trying to trade a token (rst) for eth using the uniswap js sdk , and it keeps erroring at this line.
const trade = new Trade(route, new TokenAmount(rst, ethers.utils.parseEther(“1.0”)), TradeType.EXACT_INPUT);
UnhandledPromiseRejectionWarning: Error: Invariant failed: INPUT
has anyone encountered this before or know what’s going on?
Here is a gist with the full code for reference : https://gist.github.com/Genysys/780e5aba268eef58e25f19f8cd402852
Oct 17, 2022, 5:15 PM