From 7e343657a4a6868bdc32fa92b1562d1207cd9866 Mon Sep 17 00:00:00 2001 From: Serkan Reis Date: Thu, 12 Jan 2023 13:51:03 +0300 Subject: [PATCH] Names support for SG721 contract dashboard > Query --- pages/contracts/sg721/query.tsx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/pages/contracts/sg721/query.tsx b/pages/contracts/sg721/query.tsx index 672aab8..23fff96 100644 --- a/pages/contracts/sg721/query.tsx +++ b/pages/contracts/sg721/query.tsx @@ -19,6 +19,7 @@ import { toast } from 'react-hot-toast' import { useQuery } from 'react-query' import { withMetadata } from 'utils/layout' import { links } from 'utils/links' +import { resolveAddress } from 'utils/resolveAddress' const Sg721QueryPage: NextPage = () => { const { sg721: contract } = useContracts() @@ -58,13 +59,16 @@ const Sg721QueryPage: NextPage = () => { async ({ queryKey }) => { const [_contractAddress, _type, _contract, _wallet, _tokenId, _address] = queryKey const messages = contract?.use(contractAddress) - const result = await dispatchQuery({ - messages, - type, - tokenId: _tokenId, - address: _address, + const res = await resolveAddress(_address, wallet).then(async (resolvedAddress) => { + const result = await dispatchQuery({ + messages, + type, + tokenId: _tokenId, + address: resolvedAddress, + }) + return result }) - return result + return res }, { placeholderData: null,