Ejemplo n.º 1
0
        private void HandleLedgerClosed(string data)
        {
            if (_ledgerClosed == null)
            {
                return;
            }

            var info = JsonConvert.DeserializeObject <LedgerClosedInfo>(data);

            if (info.LedgerIndex > _status.LedgerIndex)
            {
                _status.LedgerIndex = info.LedgerIndex;
                _status.LedgerTime  = info.LedgerTime;
                _status.ReserveBase = info.ReserveBase;
                _status.ReserveInc  = info.ReserveInc;
                _status.FeeBase     = info.FeeBase;
                _status.FeeRef      = info.FeeRef;

                var eArgs = new LedgerClosedEventArgs {
                    Message = data, LedgerClosed = info
                };
                OnLedgerClosed(eArgs);
            }
        }
Ejemplo n.º 2
0
 private void OnLedgerClosed(LedgerClosedEventArgs eArgs)
 {
     _ledgerClosed?.Invoke(this, eArgs);
 }