MCPcopy Create free account
hub / github.com/WardAnalytics/WardGraph / getAddressLink

Function getAddressLink

src/utils/explorer_links/getAddressLink.tsx:3–15  ·  view source on GitHub ↗
(blockchain: string, address: string)

Source from the content-addressed store, hash-verified

1import Blockchain from "../blockchain_enum";
2
3function getAddressLink(blockchain: string, address: string): string {
4 switch (blockchain) {
5 case Blockchain.BITCOIN:
6 return `https://www.blockchain.com/btc/address/${address}`;
7 case Blockchain.ETHEREUM:
8 return `https://etherscan.io/address/${address}`;
9 default:
10 console.error(
11 `No block explorer link has been set for blockchain ${blockchain}`,
12 );
13 return "";
14 }
15}
16
17export default getAddressLink;

Callers 1

BlockExplorerAddressIconFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected