Skip to content

Commit 8531508

Browse files
committed
Dashboard: Quick fix transfer tab disabled for owner of nft
1 parent b2e56f8 commit 8531508

File tree

1 file changed

+6
-1
lines changed
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]

1 file changed

+6
-1
lines changed

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/useNftDrawerTabs.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import type { ThirdwebContract } from "thirdweb";
66
import * as ERC721Ext from "thirdweb/extensions/erc721";
77
import * as ERC1155Ext from "thirdweb/extensions/erc1155";
88
import { useReadContract } from "thirdweb/react";
9+
import { checksumAddress } from "thirdweb/utils";
910
import type { NFTDrawerTab } from "./types";
1011

1112
type UseNFTDrawerTabsParams = {
@@ -108,7 +109,11 @@ export function useNFTDrawerTabs({
108109
return true;
109110
}
110111
if (isERC721) {
111-
return nft?.owner === accountAddress;
112+
return (
113+
accountAddress &&
114+
nft?.owner &&
115+
checksumAddress(nft.owner) === checksumAddress(accountAddress)
116+
);
112117
}
113118
return false;
114119
})();

0 commit comments

Comments
 (0)