From e8b6aa5ef0cefd273251f3b0f15ad561d3acefd8 Mon Sep 17 00:00:00 2001 From: bigboydiamonds <57741810+bigboydiamonds@users.noreply.github.com> Date: Thu, 25 Jul 2024 14:02:41 -0700 Subject: [PATCH 1/2] Compare against 0xee --- packages/synapse-interface/constants/tokens/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/synapse-interface/constants/tokens/index.ts b/packages/synapse-interface/constants/tokens/index.ts index 31088b2f1d..f4af71e677 100644 --- a/packages/synapse-interface/constants/tokens/index.ts +++ b/packages/synapse-interface/constants/tokens/index.ts @@ -135,6 +135,8 @@ export const tokenAddressToToken = ( if (chainId) { if (tokenAddress === WETH.addresses[chainId]) { return WETH + } else if (tokenAddress === '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE') { + return ETH } else { const token = BRIDGABLE_TOKENS[chainId]?.find((token: Token) => { return token.addresses[chainId] === tokenAddress From bdeabe54348e7559c744b4dd87affbb3d2724d3e Mon Sep 17 00:00:00 2001 From: bigboydiamonds <57741810+bigboydiamonds@users.noreply.github.com> Date: Mon, 29 Jul 2024 08:05:17 -0700 Subject: [PATCH 2/2] Use constant defined ethereum address --- packages/synapse-interface/constants/tokens/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/synapse-interface/constants/tokens/index.ts b/packages/synapse-interface/constants/tokens/index.ts index f4af71e677..deddbc8daa 100644 --- a/packages/synapse-interface/constants/tokens/index.ts +++ b/packages/synapse-interface/constants/tokens/index.ts @@ -5,8 +5,8 @@ import * as allPool from '@constants/tokens/poolMaster' import { GMX, ETH, USDC, USDT, WETH } from '@constants/tokens/bridgeable' import { SYN_ETH_SUSHI_TOKEN } from '@constants/tokens/sushiMaster' import { Chain, Token } from '@utils/types' - -import { CHAINS_BY_ID } from '@/constants/chains' +import { ETHEREUM_ADDRESS } from '@constants' +import { CHAINS_BY_ID } from '@constants/chains' const allSwap = [WETH, USDC, USDT] @@ -135,7 +135,7 @@ export const tokenAddressToToken = ( if (chainId) { if (tokenAddress === WETH.addresses[chainId]) { return WETH - } else if (tokenAddress === '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE') { + } else if (tokenAddress === ETHEREUM_ADDRESS) { return ETH } else { const token = BRIDGABLE_TOKENS[chainId]?.find((token: Token) => {