wrappedCurrency function

Token? wrappedCurrency(
  1. Currency currency,
  2. int chainId
)

Implementation

Token? wrappedCurrency(Currency currency, int chainId) {
  if (currency is Token) return currency;
  if(currency is Token){
    if(currency == Token.WETH[ChainId.MAINNET.value]){
      return Token.WETH[chainId]!;
    }
  }else {
    if(currency == ETHER){
      return Token.WETH[chainId]!;
    }
  }
  return null;
}