File tree Expand file tree Collapse file tree
neuron-ui/src/components/Transaction Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -246,9 +246,10 @@ const Transaction = () => {
246246 } )
247247 } , [ ] )
248248
249- // TODO: add conditional branch on mainnet and testnet
250249 const onExplorerBtnClick = useCallback ( ( ) => {
251- openExternal ( `https://explorer.nervos.org/transaction/${ transaction . hash } ` )
250+ const isMainnet = false // TODO: add conditional branch on mainnet and testnet
251+ const explorerUrl = isMainnet ? 'https://explorer.nervos.org' : 'https://explorer.nervos.org/testnet'
252+ openExternal ( `${ explorerUrl } /transaction/${ transaction . hash } ` )
252253 } , [ transaction . hash ] )
253254
254255 const basicInfoItems = useMemo (
Original file line number Diff line number Diff line change @@ -27,6 +27,6 @@ export default class ChainInfo {
2727 if ( this . isMainnet ( ) ) {
2828 return "https://explorer.nervos.org"
2929 }
30- return "https://explorer.nervos.org" // TODO: change this to proper testnet explorer URL
30+ return "https://explorer.nervos.org/ testnet"
3131 }
3232}
You can’t perform that action at this time.
0 commit comments