Search in sources :

Example 1 with FixedFee

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;
}
Also used : EntityId(com.hedera.mirror.common.domain.entity.EntityId) FixedFee(com.hederahashgraph.api.proto.java.FixedFee)

Aggregations

EntityId (com.hedera.mirror.common.domain.entity.EntityId)1 FixedFee (com.hederahashgraph.api.proto.java.FixedFee)1