diff --git a/Sheaft.Application.Commands/Payout/CreatePayoutCommand.cs b/Sheaft.Application.Commands/Payout/CreatePayoutCommand.cs index 90d2b6c45..157c509ab 100644 --- a/Sheaft.Application.Commands/Payout/CreatePayoutCommand.cs +++ b/Sheaft.Application.Commands/Payout/CreatePayoutCommand.cs @@ -13,6 +13,6 @@ public CreatePayoutCommand(RequestUser requestUser) : base(requestUser) } public Guid ProducerId { get; set; } - public IEnumerable TransferIds { get; set; } + public List TransferIds { get; set; } } } diff --git a/Sheaft.Application.Handlers/Commands/PayoutCommandsHandler.cs b/Sheaft.Application.Handlers/Commands/PayoutCommandsHandler.cs index 53ca7466c..28e683123 100644 --- a/Sheaft.Application.Handlers/Commands/PayoutCommandsHandler.cs +++ b/Sheaft.Application.Handlers/Commands/PayoutCommandsHandler.cs @@ -223,7 +223,7 @@ private async Task> GetNextPayoutIdsAsync(int skip, int take, .ToListAsync(token); } - private async Task>>> GetNextNewPayoutIdsAsync(int skip, int take, CancellationToken token) + private async Task>>> GetNextNewPayoutIdsAsync(int skip, int take, CancellationToken token) { var producersTransfers = await _context.Transfers .Get(t => t.Status == TransactionStatus.Succeeded @@ -236,7 +236,7 @@ private async Task>>> GetNextNe .ToListAsync(token); var groupedProducers = producersTransfers.GroupBy(t => t.ProducerId); - return groupedProducers.Select(c => new KeyValuePair>(c.Key, c.Select(t => t.TransferId))); + return groupedProducers.Select(c => new KeyValuePair>(c.Key, c.Select(t => t.TransferId)?.ToList())); } } }