< Summary

Class:DCL.Helpers.NFT.NFTOwner
Assembly:OpenSeaInterfaces
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/ServiceProviders/OpenSea/Interfaces/Types.cs
Covered lines:4
Uncovered lines:0
Coverable lines:4
Total lines:118
Line coverage:100% (4 of 4)
Covered branches:0
Total branches:0

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/ServiceProviders/OpenSea/Interfaces/Types.cs

#LineLine coverage
 1using System.Collections.Generic;
 2
 3namespace DCL.Helpers.NFT
 4{
 5    public struct NFTOwner
 6    {
 7        public string ethAddress;
 8        public List<NFTInfo> assets;
 9
 10        static public NFTOwner defaultNFTOwner
 11        {
 12            get
 13            {
 414                NFTOwner ret = new NFTOwner();
 415                ret.ethAddress = "0x0000000000000000000000000000000000000000";
 416                ret.assets = new List<NFTInfo>();
 417                return ret;
 18            }
 19        }
 20    }
 21
 22    public struct NFTInfo
 23    {
 24        public string name;
 25        public string tokenId;
 26        public string description;
 27        public string owner;
 28        public long numSales;
 29        public string imageUrl;
 30        public string thumbnailUrl;
 31        public string previewImageUrl;
 32        public string originalImageUrl;
 33        public string assetLink;
 34        public string marketLink;
 35        public string lastSaleDate;
 36        public string lastSaleAmount;
 37        public PaymentTokenInfo? lastSaleToken;
 38        public UnityEngine.Color? backgroundColor;
 39        public MarketInfo? marketInfo;
 40        public string currentPrice;
 41        public PaymentTokenInfo? currentPriceToken;
 42        public AssetContract assetContract;
 43
 44        static public NFTInfo defaultNFTInfo
 45        {
 46            get
 47            {
 48                NFTInfo ret = new NFTInfo();
 49                ret.owner = "0x0000000000000000000000000000000000000000";
 50                ret.numSales = 0;
 51                ret.assetContract = new AssetContract();
 52                return ret;
 53            }
 54        }
 55    }
 56
 57    public struct NFTInfoSingleAsset
 58    {
 59        public struct Owners
 60        {
 61            public string owner;
 62            public float quantity;
 63        }
 64
 65        public string name;
 66        public string tokenId;
 67        public string description;
 68        public string previewImageUrl;
 69        public string originalImageUrl;
 70        public string marketLink;
 71        public MarketInfo? marketInfo;
 72        public string assetLink;
 73        public Owners[] owners;
 74        public string lastSaleDate;
 75        public string lastSaleAmount;
 76        public PaymentTokenInfo? lastSaleToken;
 77        public string currentPrice;
 78        public PaymentTokenInfo? currentPriceToken;
 79        public UnityEngine.Color? backgroundColor;
 80        public AssetContract assetContract;
 81
 82        public static NFTInfoSingleAsset defaultNFTInfoSingleAsset
 83        {
 84            get
 85            {
 86                NFTInfoSingleAsset ret = new NFTInfoSingleAsset();
 87                ret.owners = new [] { new Owners() { owner = "0x0000000000000000000000000000000000000000", quantity = 0 
 88                ret.assetContract = new AssetContract();
 89                return ret;
 90            }
 91        }
 92
 93        public bool Equals(string assetContract, string tokenId)
 94        {
 95            return this.assetContract.address.ToLower() == assetContract.ToLower()
 96                   && this.tokenId == tokenId;
 97        }
 98    }
 99
 100    [System.Serializable]
 101    public struct PaymentTokenInfo
 102    {
 103        public string symbol;
 104    }
 105
 106    [System.Serializable]
 107    public struct MarketInfo
 108    {
 109        public string name;
 110    }
 111
 112    [System.Serializable]
 113    public struct AssetContract
 114    {
 115        public string address;
 116        public string name;
 117    }
 118}

Methods/Properties

defaultNFTOwner()