Commit 4baefa5
committed
Dashboard: transfer tab disabled for owner of nft (#6827)
<!--
## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"
If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):
## Notes for the reviewer
Anything important to call out? Be sure to also clarify these in your comments.
## How to test
Unit tests, playground, etc.
-->
<!-- start pr-codex -->
---
## PR-Codex overview
This PR enhances the `useNFTDrawerTabs` function by improving the owner address comparison for NFTs. It now uses the `checksumAddress` utility to ensure that both the NFT owner and the account address are valid checksummed addresses before comparing them.
### Detailed summary
- Added import for `checksumAddress` from `thirdweb/utils`.
- Updated the owner address comparison in the `useNFTDrawerTabs` function to use `checksumAddress`.
- Ensured that both `accountAddress` and `nft.owner` are checked for validity before comparison.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->1 parent b2e56f8 commit 4baefa5
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 changedLines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
111 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
112 | 117 | | |
113 | 118 | | |
114 | 119 | | |
| |||
0 commit comments