Skip to content

Commit fc3e7a1

Browse files
committed
dashboard: update gateway url
1 parent ec0a1d0 commit fc3e7a1

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed

cloud_functions/src/computeTvlTvm.ts

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { Firestore } from 'firebase-admin/firestore';
77
import { ACCOUNTANT_CONTRACT_ADDRESS } from '@wormhole-foundation/wormhole-monitor-common';
88

99
const WORMCHAIN_URLS: string[] = [
10+
'https://gateway.mainnet.xlabs.xyz',
1011
'https://tncnt-eu-wormchain-main-01.rpc.p2p.world',
1112
'https://wormchain-rpc.quickapi.com',
1213
];

dashboard/src/utils/consts.ts

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import { chainIdToChain, chainIds } from '@wormhole-foundation/sdk-base';
22
import { chainToIcon } from '@wormhole-foundation/sdk-icons';
33

4-
export const WORMCHAIN_URL = 'https://tncnt-eu-wormchain-main-01.rpc.p2p.world';
5-
export const TESTNET_WORMCHAIN_URL = `https://corsproxy.io/?${encodeURIComponent(
6-
'https://gateway.testnet.xlabs.xyz'
7-
)}`;
4+
export const WORMCHAIN_URL = import.meta.env.DEV
5+
? '/wormchain'
6+
: 'https://gateway.mainnet.xlabs.xyz';
7+
export const TESTNET_WORMCHAIN_URL = import.meta.env.DEV
8+
? '/wormchain-testnet'
9+
: 'https://gateway.testnet.xlabs.xyz';
810

911
export const WORMHOLE_RPC_HOSTS = [
1012
'https://wormhole-v2-mainnet-api.mcf.rocks',

dashboard/vite.config.ts

+14
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,18 @@ export default defineConfig({
2222
include: [/common/, /node_modules/],
2323
},
2424
},
25+
server: {
26+
proxy: {
27+
'/wormchain': {
28+
target: 'https://gateway.mainnet.xlabs.xyz',
29+
changeOrigin: true,
30+
rewrite: (path) => path.replace(/^\/wormchain/, ''),
31+
},
32+
'/wormchain-testnet': {
33+
target: 'https://gateway.testnet.xlabs.xyz',
34+
changeOrigin: true,
35+
rewrite: (path) => path.replace(/^\/wormchain-testnet/, ''),
36+
},
37+
},
38+
},
2539
});

0 commit comments

Comments
 (0)