use of org.collectiveone.modules.tokens.dto.AssetsDto in project CollectiveOneWebapp by CollectiveOne.
the class TokenService method getTokensOfHolderDtoLight.
@Transactional
public AssetsDto getTokensOfHolderDtoLight(UUID tokenTypeId, UUID holderId) {
AssetsDto assetsDto = getTokenDto(tokenTypeId, false);
/* Amount of tokens held by the input initiative */
assetsDto.setHolderId(holderId.toString());
TokenHolder holder = getHolder(tokenTypeId, holderId);
if (holder != null) {
assetsDto.setOwnedByThisHolder(holder.getTokens());
} else {
assetsDto.setOwnedByThisHolder(0.0);
}
return assetsDto;
}
Aggregations