File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
apps/dashboard/src/components/contract-components Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 11import { getThirdwebClient } from "@/constants/thirdweb.server" ;
2+ import { resolveEns } from "lib/ens" ;
23import {
34 getAllPublishedContracts ,
45 getContractPublisher ,
@@ -8,12 +9,16 @@ import { fetchDeployMetadata } from "./fetchDeployMetadata";
89
910export async function fetchPublishedContracts ( address ?: string | null ) {
1011 invariant ( address , "address is not defined" ) ;
12+ const resolvedAddress = ( await resolveEns ( address ) ) . address ;
13+ invariant ( resolvedAddress , "invalid ENS" ) ;
1114 const tempResult = (
1215 ( await getAllPublishedContracts ( {
1316 contract : getContractPublisher ( getThirdwebClient ( ) ) ,
14- publisher : address ,
17+ publisher : resolvedAddress ,
1518 } ) ) || [ ]
16- ) . filter ( ( c ) => c . contractId ) ;
19+ )
20+ . filter ( ( c ) => c . contractId )
21+ . sort ( ( a , b ) => a . contractId . localeCompare ( b . contractId ) ) ;
1722 return await Promise . all (
1823 tempResult . map ( async ( c ) => ( {
1924 ...c ,
You can’t perform that action at this time.
0 commit comments