diff --git a/src/components/atoms/EtherscanLink.tsx b/src/components/atoms/EtherscanLink.tsx index 1d1fff9fd..2a8acca93 100644 --- a/src/components/atoms/EtherscanLink.tsx +++ b/src/components/atoms/EtherscanLink.tsx @@ -36,12 +36,14 @@ export default function EtherscanLink({ const [url, setUrl] = useState() useEffect(() => { - const networkData = getNetworkData(networksList, networkId) + const networkData = networkId + ? getNetworkData(networksList, networkId) + : null const url = (!networkId && appConfig.network === 'mainnet') || networkId === 1 ? `https://etherscan.io` : `https://${ - networkId ? networkData.network : appConfig.network + networkData ? networkData.network : appConfig.network }.etherscan.io` setUrl(url) diff --git a/src/components/organisms/AssetContent/EditHistory.tsx b/src/components/organisms/AssetContent/EditHistory.tsx index d5ced01b5..108707839 100644 --- a/src/components/organisms/AssetContent/EditHistory.tsx +++ b/src/components/organisms/AssetContent/EditHistory.tsx @@ -8,7 +8,7 @@ import { gql, useQuery } from '@apollo/client' import { ReceiptData_datatokens_updates as ReceiptData } from '../../../@types/apollo/ReceiptData' const getReceipts = gql` - query ReceiptData($address: String!) { + query ReceiptData($address: ID!) { datatokens(where: { id: $address }) { createTime tx