use of com.hederahashgraph.api.proto.java.NftTransfer in project hedera-mirror-node by hashgraph.
the class EntityRecordItemListenerTokenTest method domainNftTransfer.
private com.hedera.mirror.common.domain.token.NftTransfer domainNftTransfer(long consensusTimestamp, AccountID receiver, AccountID sender, long serialNumber, TokenID token, AccountID payer) {
var nftTransfer = new com.hedera.mirror.common.domain.token.NftTransfer();
nftTransfer.setId(new NftTransferId(consensusTimestamp, serialNumber, EntityId.of(token)));
nftTransfer.setIsApproval(false);
nftTransfer.setPayerAccountId(EntityId.of(payer));
if (!receiver.equals(DEFAULT_ACCOUNT_ID)) {
nftTransfer.setReceiverAccountId(EntityId.of(receiver));
}
if (!sender.equals(DEFAULT_ACCOUNT_ID)) {
nftTransfer.setSenderAccountId(EntityId.of(sender));
}
return nftTransfer;
}
Aggregations