private async void UpdateAccountBalance(object?sender, BlockProcessedEventArgs?args)
        {
            UInt256 balanceOnNewBlock = _stateProvider.GetBalance(_accountAddress);

            if (balanceOnNewBlock == _balance)
            {
                return;
            }

            _balance = balanceOnNewBlock;
            await _webSocketsModule.SendAsync(new WebSocketsMessage("update-balance", "", _balance));
        }
Beispiel #2
0
 public Task NotifyAsync(Notification notification)
 => _webSocketsModule.SendAsync(new SocketsMessage(notification.Type, notification.Client,
                                                   notification.Data));