Exemple #1
0
        public void FillNFTInfoPanelCorrectly()
        {
            WearableItem dummyItem = CreateDummyNFT(WearableLiterals.ItemRarity.EPIC);

            var itemToggle = controller.myView.selectorsByCategory[dummyItem.data.category].itemToggles[dummyItem.id];
            var nftInfo    = (itemToggle as NFTItemToggle)?.nftItemInfo;

            Assert.NotNull(nftInfo);
            Assert.AreEqual(dummyItem.GetName(), nftInfo.name.text);
            Assert.AreEqual(dummyItem.description, nftInfo.description.text);
            Assert.AreEqual($"{dummyItem.issuedId} / {dummyItem.GetIssuedCountFromRarity(dummyItem.rarity)}", nftInfo.minted.text);
        }
Exemple #2
0
        public static Model FromWearableItem(WearableItem wearable)
        {
            var iconsIds = wearable.representations.SelectMany(x => x.bodyShapes).ToList();

            iconsIds.Add(wearable.category);

            return(new Model()
            {
                name = wearable.GetName(),
                thumbnail = wearable.baseUrl + wearable.thumbnail,
                iconIds = iconsIds,
                description = wearable.description,
                issuedId = wearable.issuedId,
                issuedTotal = wearable.GetIssuedCountFromRarity(wearable.rarity)
            });
        }