diff --git a/components/ContractInfo/index.tsx b/components/ContractInfo/index.tsx index b4f1bdd1..cd40c27b 100644 --- a/components/ContractInfo/index.tsx +++ b/components/ContractInfo/index.tsx @@ -216,7 +216,10 @@ const ContractInfo: React.FC<{ address: string; contract: PolyjuiceContractProps {contract_source_code ? ( <> {Array.isArray(sourcify_metadata) ? ( - sourcify_metadata.slice(1).map(code => { + sourcify_metadata.map(code => { + if (!code.name.endsWith('.sol')) { + return null + } return (
diff --git a/components/MultiTokenActivityList/index.tsx b/components/MultiTokenActivityList/index.tsx index 21000207..2cd168f8 100644 --- a/components/MultiTokenActivityList/index.tsx +++ b/components/MultiTokenActivityList/index.tsx @@ -124,7 +124,7 @@ const ActivityList: React.FC< {transfers?.metadata.total_count ? ( transfers.entries.map(item => { - const method = item.transaction.method_name || item.transaction.method_id + const method = item.transaction?.method_name || item.transaction?.method_id const fromBitAlias = item.from_account?.bit_alias const toBitAlias = item.to_account?.bit_alias @@ -132,16 +132,16 @@ const ActivityList: React.FC< const amounts = Array.isArray(item.amounts) ? item.amounts : [item.amount] return ( - +
- + - - {`${item.transaction.eth_hash.slice( + + {`${item.transaction?.eth_hash.slice( 0, 8, - )}...${item.transaction.eth_hash.slice(-8)}`} + )}...${item.transaction?.eth_hash.slice(-8)}`} @@ -154,7 +154,7 @@ const ActivityList: React.FC< {method ? (
@@ -170,10 +170,10 @@ const ActivityList: React.FC< -
+
-
+
{viewer ? ( diff --git a/components/NFTActivityList/index.tsx b/components/NFTActivityList/index.tsx index 6696318e..51d325b1 100644 --- a/components/NFTActivityList/index.tsx +++ b/components/NFTActivityList/index.tsx @@ -122,16 +122,16 @@ const ActivityList: React.FC< const toBitAlias = item.to_account?.bit_alias return ( - +
- + - - {`${item.transaction.eth_hash.slice( + + {`${item.transaction?.eth_hash.slice( 0, 8, - )}...${item.transaction.eth_hash.slice(-8)}`} + )}...${item.transaction?.eth_hash.slice(-8)}`} @@ -143,7 +143,7 @@ const ActivityList: React.FC< {method ? ( - +
{method}
diff --git a/components/TruncatedAddress.tsx b/components/TruncatedAddress.tsx index ded4f1f4..d5ca5655 100644 --- a/components/TruncatedAddress.tsx +++ b/components/TruncatedAddress.tsx @@ -23,18 +23,7 @@ const TruncatedAddress = ({ domain?: string placement?: 'top' | 'bottom' }) => { - if (address === ZERO_ADDRESS) { - return ( - - - - zero address - - - - ) - } - + const isZeroAddress = address === ZERO_ADDRESS const addrDisplay = getAddressDisplay({ eth_address: address, script_hash: address, @@ -67,7 +56,7 @@ const TruncatedAddress = ({ ) : ( - + )} diff --git a/package-lock.json b/package-lock.json index 0a192038..27479f72 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,7 +34,7 @@ "qrcode": "1.5.1", "react": "18.2.0", "react-dom": "18.2.0", - "react-i18next": "12.1.4", + "react-i18next": "12.2.2", "react-query": "3.39.2", "recharts": "2.3.2", "wagmi": "0.10.6" @@ -22838,9 +22838,9 @@ } }, "node_modules/react-i18next": { - "version": "12.1.4", - "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-12.1.4.tgz", - "integrity": "sha512-XQND7jYtgM7ht5PH3yIZljCRpAMTlH/zmngM9ZjToqa+0BR6xuu8c7QF0WIIOEjcMTB2S3iOfpN/xG/ZrAnO6g==", + "version": "12.2.2", + "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-12.2.2.tgz", + "integrity": "sha512-KBB6buBmVKXUWNxXHdnthp+38gPyBT46hJCAIQ8rX19NFL/m2ahte2KARfIDf2tMnSAL7wwck6eDOd/9zn6aFg==", "dependencies": { "@babel/runtime": "^7.20.6", "html-parse-stringify": "^3.0.1" @@ -42894,9 +42894,9 @@ } }, "react-i18next": { - "version": "12.1.4", - "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-12.1.4.tgz", - "integrity": "sha512-XQND7jYtgM7ht5PH3yIZljCRpAMTlH/zmngM9ZjToqa+0BR6xuu8c7QF0WIIOEjcMTB2S3iOfpN/xG/ZrAnO6g==", + "version": "12.2.2", + "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-12.2.2.tgz", + "integrity": "sha512-KBB6buBmVKXUWNxXHdnthp+38gPyBT46hJCAIQ8rX19NFL/m2ahte2KARfIDf2tMnSAL7wwck6eDOd/9zn6aFg==", "requires": { "@babel/runtime": "^7.20.6", "html-parse-stringify": "^3.0.1" diff --git a/package.json b/package.json index 95364beb..adc6ae5f 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "qrcode": "1.5.1", "react": "18.2.0", "react-dom": "18.2.0", - "react-i18next": "12.1.4", + "react-i18next": "12.2.2", "react-query": "3.39.2", "recharts": "2.3.2", "wagmi": "0.10.6" @@ -83,6 +83,6 @@ "**/*": "npm run format" }, "resolutions": { - "react-i18next": ">=11.16.4" + "react-i18next": "12.2.2" } }