Skip to content

Commit

Permalink
Merge pull request #11196 from Jarsen136/issue-11195
Browse files Browse the repository at this point in the history
fix: only collection issuer can edit NFT
  • Loading branch information
vikiival authored Nov 29, 2024
2 parents 1d9b58c + 44e74a2 commit 2b64376
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@
Delist
</NeoDropdownItem>
</template>
<GalleryItemEditNftButton :nft="nft" />
<GalleryItemEditNftButton
v-if="isCollectionOwner"
:nft="nft"
/>
<NeoDropdownItem disabled>
Report
</NeoDropdownItem>
Expand Down Expand Up @@ -94,6 +97,7 @@ const props = defineProps<{
const action = ref('')
const isOwner = computed(() => accountId.value === props.nft?.currentOwner)
const isCollectionOwner = computed(() => accountId.value === props.nft?.collection?.currentOwner)
const nftId = computed(() => props.nft?.id || '')
const { data } = useQuery({
Expand Down
1 change: 1 addition & 0 deletions queries/subsquid/ahk/nftById.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ query nftById($id: String!) {
collection {
id
name
currentOwner
}
attributes {
key: trait
Expand Down
1 change: 1 addition & 0 deletions queries/subsquid/general/nftById.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ query nftById($id: String!) {
collection {
id
name
currentOwner
floorPrice: nfts(
where: { burned_eq: false, price_not_eq: "0" }
orderBy: price_ASC
Expand Down
1 change: 1 addition & 0 deletions queries/subsquid/ksm/nftById.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ query nftById($id: String!) {
collection {
id
name
currentOwner
}
emotes {
caller
Expand Down
1 change: 1 addition & 0 deletions queries/subsquid/rmrk/nftById.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ query nftById($id: String!) {
collection {
id
name
currentOwner
}
emotes {
caller
Expand Down
1 change: 1 addition & 0 deletions types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ export interface TokenId {
export type EntityWithId = {
id: string
name: string
currentOwner: string
floor: string
}

Expand Down

0 comments on commit 2b64376

Please sign in to comment.