public IActionResult InteropStatusMintRequests()
        {
            try
            {
                var response = new InteropStatusResponseModel();

                var mintRequests = new List <ConversionRequestModel>();

                foreach (ConversionRequest request in this.conversionRequestRepository.GetAllMint(false))
                {
                    mintRequests.Add(new ConversionRequestModel()
                    {
                        RequestId          = request.RequestId,
                        RequestType        = request.RequestType,
                        RequestStatus      = request.RequestStatus,
                        BlockHeight        = request.BlockHeight,
                        DestinationAddress = request.DestinationAddress,
                        DestinationChain   = request.DestinationChain.ToString(),
                        Amount             = request.Amount,
                        Processed          = request.Processed,
                        Status             = request.RequestStatus.ToString(),
                    });
                }

                response.MintRequests = mintRequests.OrderByDescending(m => m.BlockHeight).ToList();

                return(this.Json(response));
            }
            catch (Exception e)
            {
                this.logger.LogError("Exception occurred: {0}", e.ToString());
                return(ErrorHelpers.BuildErrorResponse(HttpStatusCode.BadRequest, e.Message, e.ToString()));
            }
        }
        public IActionResult InteropStatusVotes()
        {
            try
            {
                var response = new InteropStatusResponseModel();

                var receivedVotes = new Dictionary <string, List <string> >();

                foreach ((string requestId, HashSet <PubKey> pubKeys) in this.conversionRequestCoordinationService.GetStatus())
                {
                    var pubKeyList = new List <string>();

                    foreach (PubKey pubKey in pubKeys)
                    {
                        pubKeyList.Add(pubKey.ToHex());
                    }

                    receivedVotes.Add(requestId, pubKeyList);
                }

                response.ReceivedVotes = receivedVotes;

                return(this.Json(response));
            }
            catch (Exception e)
            {
                this.logger.LogError("Exception occurred: {0}", e.ToString());
                return(ErrorHelpers.BuildErrorResponse(HttpStatusCode.BadRequest, e.Message, e.ToString()));
            }
        }
        public IActionResult InteropStatus()
        {
            try
            {
                var response = new InteropStatusResponseModel();

                var mintRequests = new List <ConversionRequestModel>();

                foreach (ConversionRequest request in this.conversionRequestRepository.GetAllMint(false))
                {
                    mintRequests.Add(new ConversionRequestModel()
                    {
                        RequestId          = request.RequestId,
                        RequestType        = request.RequestType,
                        RequestStatus      = request.RequestStatus,
                        BlockHeight        = request.BlockHeight,
                        DestinationAddress = request.DestinationAddress,
                        DestinationChain   = request.DestinationChain.ToString(),
                        Amount             = request.Amount,
                        Processed          = request.Processed
                    });
                }

                response.MintRequests = mintRequests;

                var burnRequests = new List <ConversionRequestModel>();

                foreach (ConversionRequest request in this.conversionRequestRepository.GetAllBurn(false))
                {
                    burnRequests.Add(new ConversionRequestModel()
                    {
                        RequestId          = request.RequestId,
                        RequestType        = request.RequestType,
                        RequestStatus      = request.RequestStatus,
                        BlockHeight        = request.BlockHeight,
                        DestinationAddress = request.DestinationAddress,
                        DestinationChain   = request.DestinationChain.ToString(),
                        Amount             = request.Amount,
                        Processed          = request.Processed
                    });
                }

                response.MintRequests = burnRequests;

                var receivedVotes = new Dictionary <string, List <string> >();

                foreach ((string requestId, HashSet <PubKey> pubKeys) in this.interopTransactionManager.GetStatus())
                {
                    var pubKeyList = new List <string>();

                    foreach (PubKey pubKey in pubKeys)
                    {
                        pubKeyList.Add(pubKey.ToHex());
                    }

                    receivedVotes.Add(requestId, pubKeyList);
                }

                response.ReceivedVotes = receivedVotes;

                return(this.Json(response));
            }
            catch (Exception e)
            {
                this.logger.Error("Exception occurred: {0}", e.ToString());
                return(ErrorHelpers.BuildErrorResponse(HttpStatusCode.BadRequest, e.Message, e.ToString()));
            }
        }