public async Task Handle(UpdateAllotmentEvent message, IMessageHandlerContext context)
        {
            Data.AllotmentEventId = message.AllotmentEventId;
            Data.TransactionHash  = message.TransactionHash;

            var ethereumTransactionType = GetTransactionType(message.Operation);
            await _transactionService.StartAsync(message.TransactionHash, message.UserId, EthereumTransactionEntityType.AllotmentEvent, message.AllotmentEventId, ethereumTransactionType);

            await context.SendLocal(new WaitForTransaction { TransactionHash = message.TransactionHash });
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Delete(long eventId, string transactionHash)
        {
            var command = new UpdateAllotmentEvent(
                eventId,
                transactionHash,
                AllotmentEventOperation.Delete,
                User.GetUserId());

            await _messageSession.SendLocal(command);

            return(NoContent());
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> UpdateAsync(long id, [FromBody] UpdateAllotmentEventRequest request)
        {
            var command = new UpdateAllotmentEvent(
                id,
                request.TransactionHash,
                AllotmentEventOperation.Delete,
                User.GetUserId());

            await _messageSession.SendLocal(command);

            return(NoContent());
        }