In the refactored Gateway PR, we use a function called getERC20TokenListin eth.route.js to fetch the right token list given mainnet, kovan, network etc.
This is unnecessary because token lists have different chain IDs for kovan and other testnets. For instance, the default Uniswap list (https://gateway.ipfs.io/ipns/tokens.uniswap.org) has different addresses for mainnet (chainID=1), ropsten (chainID=3), kovan (chainID=42)
What
Change ETHEREUM_CHAIN in .env to ETHEREUM_CHAIN_ID so that the user inputs the ID directly
Change functions that depend on the chain name kovan
Modify getERC20TokenAddresses function in eth.js so that it uses the chainID to get the correct address for a given symbol
Remove the getERC20TokenList function in eth.js since it should no longer be needed
Why
In the refactored Gateway PR, we use a function called
getERC20TokenList
ineth.route.js
to fetch the right token list given mainnet, kovan, network etc.This is unnecessary because token lists have different chain IDs for kovan and other testnets. For instance, the default Uniswap list (https://gateway.ipfs.io/ipns/tokens.uniswap.org) has different addresses for mainnet (chainID=1), ropsten (chainID=3), kovan (chainID=42)
What
.env
to ETHEREUM_CHAIN_ID so that the user inputs the ID directlykovan
getERC20TokenAddresses
function in eth.js so that it uses the chainID to get the correct address for a given symbolgetERC20TokenList
function in eth.js since it should no longer be needed