Exemplo n.º 1
0
 public IEnumerable <ISyncStatus> GetStatuses()
 {
     return(_nbXplorerDashboard.GetAll()
            .Where(summary => summary.Network.ShowSyncSummary)
            .Select(summary => new ServerInfoSyncStatusData2
     {
         CryptoCode = summary.Network.CryptoCode,
         NodeInformation = summary.Status.BitcoinStatus is BitcoinStatus s ? new ServerInfoNodeData()
         {
             Headers = s.Headers,
             Blocks = s.Blocks,
             VerificationProgress = s.VerificationProgress
         } : null,
         ChainHeight = summary.Status.ChainHeight,
         SyncHeight = summary.Status.SyncHeight
     }));
Exemplo n.º 2
0
        public async Task <ActionResult> ServerInfo()
        {
            var stores = await _storeRepository.GetStoresByUserId(_userManager.GetUserId(User));

            var supportedPaymentMethods = _paymentMethodHandlerDictionary
                                          .SelectMany(handler => handler.GetSupportedPaymentMethods().Select(id => id.ToString()))
                                          .Distinct();
            var syncStatus = _dashBoard.GetAll()
                             .Where(summary => summary.Network.ShowSyncSummary)
                             .Select(summary => new ServerInfoSyncStatusData
            {
                CryptoCode      = summary.Network.CryptoCode,
                NodeInformation = summary.Status.BitcoinStatus is BitcoinStatus s ? new ServerInfoNodeData()
                {
                    Headers = s.Headers,
                    Blocks  = s.Blocks,
                    VerificationProgress = s.VerificationProgress
                } : null,
                ChainHeight = summary.Status.ChainHeight,
                SyncHeight  = summary.Status.SyncHeight
            });