nft-storefront icon indicating copy to clipboard operation
nft-storefront copied to clipboard

[BUG] Incorrect function name `hasListingBecomeGhosted`

Open LanfordCai opened this issue 2 years ago • 0 comments

Current Behavior

        /// hasListingBecomeGhosted
        /// Tells whether listed NFT is present in provided capability.
        /// If it returns `false` then it means listing becomes ghost or sold out.
        pub fun hasListingBecomeGhosted(): Bool {
            if let providerRef = self.nftProviderCapability.borrow() {
                let availableIDs = providerRef.getIDs()
                return availableIDs.contains(self.details.nftID)
            }
            return false
        }

If this function returns false then it means listing becomes ghost or sold out.

Expected Behavior

But the name of the function is hasListingBecomeGhosted... Intuitively, it should return TRUE rather than FALSE when the listing has become ghosted or sold out.

LanfordCai avatar Jul 30 '23 13:07 LanfordCai