private void OnNewReceived(object?sender, UserOperationEventArgs e)
 {
     ScheduleAction(() =>
     {
         JsonRpcResult result = CreateSubscriptionMessage(new { UserOperation = new UserOperationRpc(e.UserOperation), EntryPoint = e.EntryPoint });
         JsonRpcDuplexClient.SendJsonRpcResult(result);
         if (_logger.IsTrace)
         {
             _logger.Trace($"newReceivedUserOperations subscription {Id} printed hash of newReceivedUserOperations.");
         }
     });
 }
示例#2
0
 private void OnNewPending(object?sender, UserOperationEventArgs e)
 {
     ScheduleAction(() =>
     {
         JsonRpcResult result;
         if (_includeUserOperations)
         {
             result = CreateSubscriptionMessage(new { UserOperation = new UserOperationRpc(e.UserOperation), EntryPoint = e.EntryPoint });
         }
         else
         {
             result = CreateSubscriptionMessage(new { UserOperation = e.UserOperation.RequestId, EntryPoint = e.EntryPoint });
         }
         JsonRpcDuplexClient.SendJsonRpcResult(result);
         if (_logger.IsTrace)
         {
             _logger.Trace($"newPendingUserOperations subscription {Id} printed hash of newPendingUserOperations.");
         }
     });
 }