use of com.hederahashgraph.api.proto.java.FixedFee in project hedera-mirror-node by hashgraph.
the class EntityRecordItemListenerTokenTest method convertFixedFee.
private FixedFee.Builder convertFixedFee(CustomFee customFee) {
FixedFee.Builder fixedFee = FixedFee.newBuilder().setAmount(customFee.getAmount());
EntityId denominatingTokenId = customFee.getDenominatingTokenId();
if (denominatingTokenId != null) {
if (denominatingTokenId.equals(customFee.getId().getTokenId())) {
fixedFee.setDenominatingTokenId(TokenID.getDefaultInstance());
} else {
fixedFee.setDenominatingTokenId(convertTokenId(denominatingTokenId));
}
}
return fixedFee;
}