Skip to content

Commit

Permalink
dashboard: use correct vaa explorer URL
Browse files Browse the repository at this point in the history
  • Loading branch information
panoel authored and evan-gray committed Jan 17, 2024
1 parent 6fc2299 commit 63d9a16
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion common/src/explorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@ export const explorerTx = (chainId: ChainId, tx: string) =>
? `https://bigdipper.live/wormhole/transactions/${tx}`
: '';

export const explorerVaa = (key: string) => `https://wormholescan.io/#/tx/${key}`;
export const explorerVaa = (network: string, key: string) =>
network === 'mainnet'
? `https://wormholescan.io/#/tx/${key}`
: `https://wormholescan.io/#/tx/${key}?network=TESTNET`;

export const getExplorerTxHash = (chain: ChainId, txHash: string) => {
let explorerTxHash = '';
Expand Down
3 changes: 2 additions & 1 deletion dashboard/src/components/Monitor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ const missingBlockSx: SxProps<Theme> = {
};

function BlockDetail({ chain, message }: { chain: string; message: ObservedMessage }) {
const { currentNetwork } = useNetworkContext();
const vaaId = `${message.chain}/${message.emitter}/${message.seq}`;
return (
<Box>
Expand Down Expand Up @@ -110,7 +111,7 @@ function BlockDetail({ chain, message }: { chain: string; message: ObservedMessa
gutterBottom
>
<IconButton
href={explorerVaa(vaaId)}
href={explorerVaa(currentNetwork.env, vaaId)}
target="_blank"
size="small"
sx={inlineIconButtonSx}
Expand Down

0 comments on commit 63d9a16

Please sign in to comment.