class FundServiceImpl implements FundService {

    @Override
    @Transactional(readOnly = true)
    public FundsForRequestDto getFundsForRequestGroupedByFunder(final Long requestId) {
        final List<UserFundsDto> userFunds = getFundsAndRefundsFor(requestId);
        enrichFundsWithZeroValues(userFunds);
        final TokenValueDto fndFunds = totalFunds(userFunds, UserFundsDto::getFndFunds, UserFundsDto::getFndRefunds);
        final TokenValueDto otherFunds = totalFunds(userFunds, UserFundsDto::getOtherFunds, UserFundsDto::getOtherRefunds);
        return FundsForRequestDto.builder()
                                 .userFunds(userFunds)
                                 .fndFunds(fndFunds)
                                 .otherFunds(otherFunds)
                                 .usdFunds(fiatService.getUsdPrice(fndFunds, otherFunds))
                                 .build();
    }

    @Autowired public  FundServiceImpl(final FundRepository fundRepository,
                           final RefundRepository refundRepository,
                           final PendingFundRepository pendingFundRepository,
                           final RequestRepository requestRepository,
                           final Mappers mappers,
                           final ApplicationEventPublisher eventPublisher,
                           final CacheManager cacheManager,
                           final FundRequestContractsService fundRequestContractsService,
                           final FiatService fiatService,
                           final TokenValueMapper tokenValueMapper,
                           final FundFundsByFunderAggregator fundFundsByFunderAggregator,
                           final RefundFundsByFunderAggregator refundFundsByFunderAggregator,
                           final FundsAndRefundsAggregator fundsAndRefundsAggregator);

}