diff --git a/src/components/cards/PairPriceGraph/PairPriceGraph.vue b/src/components/cards/PairPriceGraph/PairPriceGraph.vue index 5880ed909b..e37c8983e7 100644 --- a/src/components/cards/PairPriceGraph/PairPriceGraph.vue +++ b/src/components/cards/PairPriceGraph/PairPriceGraph.vue @@ -155,7 +155,10 @@ const { ); const equivalentTokenPairs = [ - [appNetworkConfig.addresses.weth, appNetworkConfig.nativeAsset.address], + [ + appNetworkConfig.tokens.Addresses.wNativeAsset, + appNetworkConfig.tokens.Addresses.nativeAsset, + ], ]; const allChartValuesEqual = computed(() => diff --git a/src/components/cards/SwapCard/SwapCard.vue b/src/components/cards/SwapCard/SwapCard.vue index 32a8bc1d15..e5cb1c0870 100644 --- a/src/components/cards/SwapCard/SwapCard.vue +++ b/src/components/cards/SwapCard/SwapCard.vue @@ -405,9 +405,6 @@ export default defineComponent({ setTokenOutAmount(assetOutAmount); } } - function switchToWETH() { - tokenInAddress.value = appNetworkConfig.addresses.weth; - } function handlePreviewButton() { swapping.resetSubmissionError(); modalSwapPreviewIsOpen.value = true; @@ -447,7 +444,6 @@ export default defineComponent({ handlePreviewButton, handlePreviewModalClose, // methods - switchToWETH, handleErrorButtonClick, }; }, diff --git a/src/components/cards/SwapCard/SwapRoute.vue b/src/components/cards/SwapCard/SwapRoute.vue index 839a2ecf8c..2180ece84f 100644 --- a/src/components/cards/SwapCard/SwapRoute.vue +++ b/src/components/cards/SwapCard/SwapRoute.vue @@ -6,10 +6,12 @@ import BigNumber from 'bignumber.js'; import useNumbers, { FNumFormats } from '@/composables/useNumbers'; import { useTokens } from '@/providers/tokens.provider'; -import { NATIVE_ASSET_ADDRESS } from '@/constants/tokens'; +import { + NATIVE_ASSET_ADDRESS, + WRAPPED_NATIVE_ASSET_ADDRESS, +} from '@/constants/tokens'; import { isSameAddress } from '@/lib/utils'; import { SorReturn } from '@/lib/utils/balancer/helpers/sor/sorManager'; -import useWeb3 from '@/services/web3/useWeb3'; import { networkSlug } from '@/composables/useNetwork'; interface Props { @@ -46,7 +48,6 @@ const props = defineProps(); const { fNum } = useNumbers(); -const { appNetworkConfig } = useWeb3(); const { getToken } = useTokens(); const visible = ref(false); @@ -97,13 +98,13 @@ function getV2Routes( addresses: string[] ): Route[] { // ) { - const { addresses: constants } = appNetworkConfig; - addressIn = - addressIn === NATIVE_ASSET_ADDRESS ? constants.weth : getAddress(addressIn); + addressIn === NATIVE_ASSET_ADDRESS + ? WRAPPED_NATIVE_ASSET_ADDRESS + : getAddress(addressIn); addressOut = addressOut === NATIVE_ASSET_ADDRESS - ? constants.weth + ? WRAPPED_NATIVE_ASSET_ADDRESS : getAddress(addressOut); if ( @@ -131,11 +132,11 @@ function getV2Routes( if (rawPool) { const tokenIn = addresses[swap.assetInIndex] === AddressZero - ? constants.weth + ? WRAPPED_NATIVE_ASSET_ADDRESS : getAddress(addresses[swap.assetInIndex]); const tokenOut = addresses[swap.assetOutIndex] === AddressZero - ? constants.weth + ? WRAPPED_NATIVE_ASSET_ADDRESS : getAddress(addresses[swap.assetOutIndex]); const isDirectSwap = diff --git a/src/components/contextual/pages/pool/add-liquidity/WrapStEthLink.vue b/src/components/contextual/pages/pool/add-liquidity/WrapStEthLink.vue index fb67730b87..9c3e9e3f94 100644 --- a/src/components/contextual/pages/pool/add-liquidity/WrapStEthLink.vue +++ b/src/components/contextual/pages/pool/add-liquidity/WrapStEthLink.vue @@ -30,8 +30,12 @@ const { networkSlug } = useNetwork(); /** * COMPUTED */ -const stETH = computed(() => getToken(networkConfig.addresses.stETH)); -const wstETH = computed(() => getToken(networkConfig.addresses.wstETH)); +const stETH = computed(() => + getToken(networkConfig.tokens.Addresses.stETH || '') +); +const wstETH = computed(() => + getToken(networkConfig.tokens.Addresses.wstETH || '') +);