mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-29 02:00:31 +08:00
Add an explorer link to the not found page
This commit is contained in:
@@ -51,3 +51,11 @@ export function getSearchParam(key: string, location: RouteLocation): string | n
|
||||
let params = new URLSearchParams(location.search);
|
||||
return params.get(key);
|
||||
}
|
||||
|
||||
// Get the explorer link of an address, eg. Etherscan.
|
||||
export function explorerLink(addr: string, config: Config): string {
|
||||
if (config.network.name == "ropsten") {
|
||||
return `https://ropsten.etherscan.io/address/${addr}`;
|
||||
}
|
||||
return `https://etherscan.io/address/${addr}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user