hi all,
I am implementing the 1inch api on my dapp. I use metamask and ethers.
swapping native tokens goes well. When I try swap from an ERC20 token to native token, I don’t get the right suggestion from metamask. It shows the correct amount, but not the erc20 token but ETH.
I included the approval step before.
Any idea what causes this?
thanks!
const url = (`https://api.1inch.io/v4.0/1/swap?fromTokenAddress=${fromTokenAddress}&toTokenAddress=${toTokenAddress}&amount=${fromTokenAmount}&fromAddress=${fromAddress}&slippage=1&referrerAddress${}&fee=1&disableEstimate=true&allowPartialFill=true`);