From fb111d9b50296cbfb7c5eac2b74ca4ca2468d9fa Mon Sep 17 00:00:00 2001 From: Sebastian Scatularo Date: Tue, 21 Nov 2023 17:37:58 -0300 Subject: [PATCH] refactor config const for href template --- apps/connect/vite.token-bridge.config.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/connect/vite.token-bridge.config.ts b/apps/connect/vite.token-bridge.config.ts index d37919925..6591c982d 100644 --- a/apps/connect/vite.token-bridge.config.ts +++ b/apps/connect/vite.token-bridge.config.ts @@ -3,6 +3,9 @@ import viteConfig from './vite.config' const PUBLIC_URL = viteConfig.base; +const ADVANCE_TOOLS_HREF = `${PUBLIC_URL}/advance-tools/#/transfer` +const ADVANCE_TOOLS_HREF_TEMPLATE = `${ADVANCE_TOOLS_HREF}?sourceChain={:sourceChain}&targetChain={:targetChain}` + // https://vitejs.dev/config/ export default defineConfig({ ...viteConfig, @@ -14,7 +17,7 @@ export default defineConfig({ wormholeConnectConfig: { ...viteConfig?.define?.wormholeConnectConfig, moreNetworks: { - href: `${PUBLIC_URL}/advance-tools/#/transfer?sourceChain={:sourceChain}&targetChain={:targetChain}`, + href: ADVANCE_TOOLS_HREF_TEMPLATE, target: "_blank", description: "Advance Tools offers unlimited transfers across chains for tokens and NFTs wrapped by Wormhole.", networks: [ @@ -38,13 +41,13 @@ export default defineConfig({ name: "more", label: "More networks", showOpenInNewIcon: false, - href: `${PUBLIC_URL}/advance-tools/#/transfer`, + href: ADVANCE_TOOLS_HREF, } ] }, moreTokens: { label: "More tokens ...", - href: `${PUBLIC_URL}/advance-tools/#/transfer?sourceChain={:sourceChain}&targetChain={:targetChain}`, + href: ADVANCE_TOOLS_HREF_TEMPLATE, } } }