Hey, I am using 1inch API to swap from BNB/MATIC/ETH to token but it doesn’t work
it work for token swap but when I try to swap native coin to any token it doesn’t work, I get very big amount in confirmation pop up
also I use same response on TrustWallet and it is working perfectly
here is API response that I send in params
{
"from": "0xab4c8a98bd030029cf08ae5198bd6a347c2e12ec",
"to": "0x1111111254eeb25477b68fb85ed929f73a960582",
"data": "0x12aa3caf000000000000000000000000170d2ed0b2a5d9f450652be814784f964749ffa4000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee000000000000000000000000e9e7cea3dedca5984780bafc599bd69add087d56000000000000000000000000170d2ed0b2a5d9f450652be814784f964749ffa4000000000000000000000000ab4c8a98bd030029cf08ae5198bd6a347c2e12ec00000000000000000000000000000000000000000000000000017ff8d04c7800000000000000000000000000000000000000000000000000015c4a6093637b080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009b00000000000000000000000000000000000000000000000000007d00001a4041bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095cd0e30db002a0000000000000000000000000000000000000000000000000015c4a6093637b08ee63c1e581cb99fe720124129520f7a09ca3cbef78d58ed934bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c1111111254eeb25477b68fb85ed929f73a9605820000000000cfee7c08",
"value": "422181600000000",
}
``
![Screenshot 2023-06-09 at 2.43.23 PM|266x499](upload://zvamG5ouP34Rmf0ntkuf6fuujCt.jpeg)
I am using Flutter, 1inch API and Android/IOS
Thanks for reporting!
Could you provide on the steps you take specifically when interacting with the swap 1inch API function ? Or provide source code with request and response object.
Perhaps there are some error logs in the console ?
here is API and I use tx of response Map
api . 1inch dot io/ v5.0/56/swap?fromTokenAddress=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE&toTokenAddress=0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56&amount=422181600000000&fromAddress=0xab4c8a98bd030029cf08ae5198bd6a347c2e12ec&slippage=10
`