kodadot / loligo

Common good repository for Squid indexers in KodaDot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement available collections to mint for user

vikiival opened this issue · comments

Currently we are using a really ugly hack on frontend to determine if user can mint in the collection.

        totalCount: ce.nfts?.filter((nft) => !nft.burned).length,
       }))
       .filter(
         (ce: MintedCollectionKusama) =>
           (ce.max || Infinity) - ce.alreadyMinted > 0
       )

The task:

Implement a resolver that would take address as parameter and returns a list of collections that could be used for minting