import { useMappedChainData } from "./useMappedChainData";

export const useExplorerLink = ({txHash, chainId}:{txHash: string; chainId: number}) => {
	const mappedChainData = useMappedChainData();
	const chain = mappedChainData?.[chainId];
	const explorerLink = chain?.explorers?.[0];

	return `${explorerLink}/tx/${txHash}`;
}