You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
350 B
13 lines
350 B
4 years ago
|
import { createAccountLinkForChain } from '@metamask/etherscan-link';
|
||
|
|
||
|
export default function getAccountLink(address, chainId, rpcPrefs) {
|
||
6 years ago
|
if (rpcPrefs && rpcPrefs.blockExplorerUrl) {
|
||
4 years ago
|
return `${rpcPrefs.blockExplorerUrl.replace(
|
||
|
/\/+$/u,
|
||
|
'',
|
||
4 years ago
|
)}/address/${address}`;
|
||
6 years ago
|
}
|
||
|
|
||
4 years ago
|
return createAccountLinkForChain(address, chainId);
|
||
8 years ago
|
}
|