public OwnedNFTRequestHandler(RequestOwnedNFTs request, RequestController requestController)
        {
            if (VERBOSE)
            {
                Debug.Log($"OwnedNFTRequestHandler: ({GetHashCode()}) {request.requestId} created");
            }

            this.request           = request;
            this.requestController = requestController;
            schedulableHandler.SetReadyToBeScheduled(this);
        }
Пример #2
0
        public RequestBase <AssetsResponse> FetchOwnedNFT(string address)
        {
            if (cacheSeveralAssetsResponse.TryGetValue(RequestOwnedNFTs.GetId(address), out RequestBase <AssetsResponse> request))
            {
                return(request);
            }

            var newRequest = new RequestOwnedNFTs(address);

            AddToCache(newRequest);

            newRequest.OnFail += OnRequestFailed;

            var requestHandler = new OwnedNFTRequestHandler(newRequest, this);

            requestScheduler.EnqueueRequest(requestHandler);

            return(newRequest);
        }