superhero-com / superhero-wallet

Superhero Wallet – More than just a way to receive, store & send tokens on the æternity blockchain
https://wallet.superhero.com
ISC License
39 stars 42 forks source link

WalletConnect: establishing amount when swapping token to ETH #3093

Open peronczyk opened 3 weeks ago

peronczyk commented 3 weeks ago

When swapping any ERC-20 fungible token into ETH coin the dapp (Uniswap) is not giving us direct information about the amount value user want to swap. Here is an example data for such transaction received from UniSwap:

data: "0x2e1a7d4d00000000000000000000000000000000000000000000000000662f58c301877a"
from: "0x1fa2c78ab75ffff21761a135256a767c6372da71"
gas: "0x8dcd"
to: "0xfff9976782d46cc05630d1f6ebab18b2324d6b14"

Probably we need to decode the data entry in order to know the amount. This task is about doing the research and if possible implementing this.