Skip to content

Commit

Permalink
refactor config const for href template
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianscatularo committed Nov 21, 2023
1 parent 200d02f commit fb111d9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions apps/connect/vite.token-bridge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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: [
Expand All @@ -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,
}
}
}
Expand Down

0 comments on commit fb111d9

Please sign in to comment.