Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add possibility to remove collection #3206

Closed
vikiival opened this issue Jun 19, 2022 · 5 comments · Fixed by #4546
Closed

Add possibility to remove collection #3206

vikiival opened this issue Jun 19, 2022 · 5 comments · Fixed by #4546
Labels
A-basilisk issues related to basilisk parachain p2 core functionality, or is affecting 60% of app

Comments

@vikiival
Copy link
Member

vikiival commented Jun 19, 2022

Currently, empty collections don't show up in the explorer. However, in order to delete a collection (destroy class from the initial implementation requirements, ref. #660) it must be empty.

Catch 22 with collections, I'm thinking, adding option to show user his/her empty collections and add option to delete them. This could be done under profile tab Collections with simple checkbox such as Show empty collections

/edit with @roiLeo idea:

can't we create a /bsx/admin like for rmrk? Is this page used for that kind of stuff?

@vikiival vikiival added the A-basilisk issues related to basilisk parachain label Jun 19, 2022
@yangwao yangwao added the p1 preventing everyone from using app label Jun 19, 2022
@petersopko petersopko mentioned this issue Jun 27, 2022
89 tasks
@yangwao yangwao added p2 core functionality, or is affecting 60% of app and removed p1 preventing everyone from using app labels Jul 7, 2022
@petersopko
Copy link
Contributor

as @roiLeo mentioned in

the trash button only works if you have link to empty collection, example here:
https://kodadot.xyz/bsx/collection/845595670

image

@roiLeo
Copy link
Contributor

roiLeo commented Sep 21, 2022

If I understand, the goal here is to add a feature (on /admin ?) when creator decide to burn collection it will burn all nfts from this collection & burn the collection.

@vikiival
Copy link
Member Author

If I understand, the goal here is to add a feature

Yup, somehow in the UX friendly manner

@roiLeo
Copy link
Contributor

roiLeo commented Dec 21, 2022

Step By Step

  • check that you own all NFTs present in collection (in order to enable trash button)
  • query non_burned NFTs & fetch their id
  • loop args & finish with destroy_collection
const api = await this.useApi()
const cb = api.tx.utility.batchAll
const args = [
  api.tx.nft.burn(collectionId, non_burnedNftId1),
  api.tx.nft.burn(collectionId, non_burnedNftId2),
  api.tx.nft.burn(collectionId, non_burnedNftId3),
  ...
  api.tx.nft.destroyCollection(collectionId),
]
  • send TX
  • profit.

@vikiival
Copy link
Member Author

Yes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-basilisk issues related to basilisk parachain p2 core functionality, or is affecting 60% of app
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants