From 71a979fe7eb52ad8ef8984c6bb98b3a2fbe1690a Mon Sep 17 00:00:00 2001 From: Jun Ma Date: Mon, 10 Apr 2023 00:28:43 +0800 Subject: [PATCH 1/4] fix cannot read properties in multi-token page --- components/MultiTokenActivityList/index.tsx | 18 +++++++++--------- components/NFTActivityList/index.tsx | 12 ++++++------ 2 files changed, 15 insertions(+), 15 deletions(-) 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}
From 955e8ccbccac65a538cdd7c7769a413ae78fc5f8 Mon Sep 17 00:00:00 2001 From: Keith Date: Wed, 12 Apr 2023 10:41:52 +0800 Subject: [PATCH 2/4] fix: filter metadata files out of source code This commit fixes the source code list by filtering files those not ending with .sol, so only solidity files will be displayed --- components/ContractInfo/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 (
From 3744f74e514e7ffdd9382faa61df4d9b6e870f75 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 24 Apr 2023 16:34:29 +0000 Subject: [PATCH 3/4] fix(deps): update dependency react-i18next to v12.2.2 --- package-lock.json | 14 +++++++------- package.json | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) 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" } } From 020f9885d67775fd9bc9870fb4d0ba79154a305e Mon Sep 17 00:00:00 2001 From: Jun Ma Date: Tue, 25 Apr 2023 21:49:07 +0800 Subject: [PATCH 4/4] fix: user account add zero address link jump --- components/TruncatedAddress.tsx | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) 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 = ({ ) : ( - + )}