Skip to content

Commit

Permalink
feat: Finalize testnet explorer URL
Browse files Browse the repository at this point in the history
  • Loading branch information
ashchan committed Nov 9, 2019
1 parent 15d1ec6 commit 848fe7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions packages/neuron-ui/src/components/Transaction/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,10 @@ const Transaction = () => {
})
}, [])

// TODO: add conditional branch on mainnet and testnet
const onExplorerBtnClick = useCallback(() => {
openExternal(`https://explorer.nervos.org/transaction/${transaction.hash}`)
const isMainnet = false // TODO: add conditional branch on mainnet and testnet
const explorerUrl = isMainnet ? 'https://explorer.nervos.org' : 'https://explorer.nervos.org/testnet'
openExternal(`${explorerUrl}/transaction/${transaction.hash}`)
}, [transaction.hash])

const basicInfoItems = useMemo(
Expand Down
2 changes: 1 addition & 1 deletion packages/neuron-wallet/src/models/chain-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ export default class ChainInfo {
if (this.isMainnet()) {
return "https://explorer.nervos.org"
}
return "https://explorer.nervos.org" // TODO: change this to proper testnet explorer URL
return "https://explorer.nervos.org/testnet"
}
}

0 comments on commit 848fe7b

Please sign in to comment.