diff --git a/src/components/Details/DetailsCard.tsx b/src/components/Details/DetailsCard.tsx index cc02ac16..985cb489 100644 --- a/src/components/Details/DetailsCard.tsx +++ b/src/components/Details/DetailsCard.tsx @@ -10,8 +10,8 @@ import SoundOffIcon from "../../assets/icons/sound-off.svg"; import { ImgOrFail } from "../elements/ImgOrFail"; import { extractHash } from "./helpers"; -import { FromLink } from "../elements/ExplorerLink"; +import { truncate } from "./helpers"; export interface DetailsCard { data: { loading: boolean; @@ -38,7 +38,10 @@ const DetailsCard = ({ data, copyProps }: DetailsCard) => { const nftVideo = useRef(null); const isMobile = useIsMobile(); - const truncateSize = useMemo(() => (isMobile ? 33 : 60), [isMobile]); + const truncateSize = useMemo( + () => (window.innerWidth < 1150 ? 33 : 65), + [isMobile] + ); // @ts-ignore const toggleSound = () => { @@ -250,8 +253,21 @@ const DetailsCard = ({ data, copyProps }: DetailsCard) => { > ID: -
- {dataLoad ? "" : event.tokenId} +
+ + {dataLoad + ? "" + : event.tokenId && event.tokenId.length > 50 + ? truncate(event.tokenId, truncateSize) + : event.tokenId} + + {!dataLoad && ( + + )}
{!dataLoad && ( @@ -276,7 +292,11 @@ const DetailsCard = ({ data, copyProps }: DetailsCard) => { rel="noreferrer" className="text-[#222222] w-32 trxHash" > - + {truncate( + event?.fromHash && + extractHash(event.fromHash), + truncateSize + ) || "N/A"}
{" "} diff --git a/src/components/Details/DetailsList.tsx b/src/components/Details/DetailsList.tsx index 25402c71..05a4bbe2 100644 --- a/src/components/Details/DetailsList.tsx +++ b/src/components/Details/DetailsList.tsx @@ -59,7 +59,10 @@ const DetailsList = ({ data, copyProps }: DetailsCard) => { // setToIconSrc(""); // } chains?.map((chain) => { - if (chain?.name === chainNoncetoName[event?.fromChain || 0]) { + if ( + chain.name?.toLowerCase() === + chainNoncetoName[event?.fromChain || 0]?.toLowerCase() + ) { if (chain?.icon[0] === ".") { setFromIconSrc(chain?.icon?.slice(1)); } else { @@ -282,6 +285,39 @@ const DetailsList = ({ data, copyProps }: DetailsCard) => { )}

+ {event?.destContract && ( +
+
+ To Contract: +
+

+ + + {truncate(event.destContract, truncateSize) || + "N/A"} + + + {!dataLoad && ( + + )} +

+
+ )}
Date:

= ({ status = "" }) => { diff --git a/src/components/Table/CollectionNameRow.tsx b/src/components/Table/CollectionNameRow.tsx index 701f5d51..9291e620 100644 --- a/src/components/Table/CollectionNameRow.tsx +++ b/src/components/Table/CollectionNameRow.tsx @@ -1,42 +1,34 @@ import { truncate } from "../Details/helpers"; -import { txExplorers } from "../../constants"; -import { useState } from "react"; + import { IEvent } from "../ExplorerEvents"; import { setShowByCollection } from "../../store/global"; import { useDispatch } from "react-redux"; -export const CollectionNameRow = ({ - collectionName, - chain, - hash, -}: { - collectionName: string; - chain: string; - hash: string; -}) => { - const [events, setEvents] = useState([]); - const dispatch = useDispatch(); - const showCollection = (e: any) => { - e.stopPropagation(); - //console.log("collectionName row", collectionName); +export const CollectionNameRow = ({ event }: { event: IEvent }) => { + const dispatch = useDispatch(); + const { collectionName } = event; + const showCollection = (e: any) => { + e.stopPropagation(); + //console.log("collectionName row", collectionName); + + a(); + }; - a(); - }; + const a = () => { + //console.log("collectionName a", collectionName); + dispatch(setShowByCollection(collectionName)); + //console.log("collectionName a", collectionName); + }; - const a = () => { - //console.log("collectionName a", collectionName); - dispatch(setShowByCollection(collectionName)); - //console.log("collectionName a", collectionName); - }; - return ( - - ); + return ( + + ); }; diff --git a/src/constants.ts b/src/constants.ts index 6ae75b2b..d7f78c4e 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -70,7 +70,7 @@ export const txExplorers: any = { "25": "https://explore.vechain.org/transactions/", "15": "https://algoexplorer.io/tx/", "22": "https://v1.gwscan.com/tx/", - "24": "https://secretnodes.com/secret/transactions/", + "24": "https://www.mintscan.io/secret/transactions/", "32": "https://moonscan.io/tx/", "33": "https://scan.abeychain.com/tx/", "28": "https://dashboard.internetcomputer.org/account/", @@ -104,7 +104,7 @@ export const addressExplorers: any = { "25": "https://explore.vechain.org/accounts/", "15": "https://algoexplorer.io/address/", "22": "https://v1.gwscan.com/tx/", - "24": `https://atomscan.com/secret-network/accounts/`, + "24": `https://www.mintscan.io/secret/accounts/`, "32": "https://moonscan.io/address/", "27": "https://tonscan.org/address/", "33": "https://scan.abeychain.com/address/", diff --git a/src/pages/Search.tsx b/src/pages/Search.tsx index 944ba629..311674b0 100644 --- a/src/pages/Search.tsx +++ b/src/pages/Search.tsx @@ -390,15 +390,7 @@ export const Search = (props: any) => {