use of org.collectiveone.modules.assignations.Bill in project CollectiveOneWebapp by CollectiveOne.
the class TokenTransferService method getTransfersPending.
@Transactional
public List<TransferDto> getTransfersPending(UUID initiativeId) {
Initiative initiative = initiativeRepository.findById(initiativeId);
List<TransferDto> transfersPending = new ArrayList<TransferDto>();
List<Assignation> assignations = assignationService.getOpenAssignations(initiativeId);
for (Assignation assignation : assignations) {
for (Bill bill : assignation.getBills()) {
TransferDto dto = new TransferDto();
dto.setAssetId(bill.getTokenType().getId().toString());
dto.setAssetName(bill.getTokenType().getName());
dto.setSenderId(initiative.getId().toString());
dto.setSenderName(initiative.getMeta().getName());
dto.setValue(bill.getValue());
transfersPending.add(dto);
}
}
return transfersPending;
}
Aggregations