use of com.hederahashgraph.api.proto.java.TokenUnpauseTransactionBody in project hedera-services by hashgraph.
the class HapiTokenUnpause method opBodyDef.
@Override
protected Consumer<TransactionBody.Builder> opBodyDef(final HapiApiSpec spec) throws Throwable {
var tId = TxnUtils.asTokenId(token, spec);
TokenUnpauseTransactionBody opBody = spec.txns().<TokenUnpauseTransactionBody, TokenUnpauseTransactionBody.Builder>body(TokenUnpauseTransactionBody.class, b -> {
b.setToken(tId);
});
return b -> b.setTokenUnpause(opBody);
}
use of com.hederahashgraph.api.proto.java.TokenUnpauseTransactionBody in project hedera-mirror-node by hashgraph.
the class EntityRecordItemListener method insertTokenUnpause.
private void insertTokenUnpause(RecordItem recordItem) {
if (entityProperties.getPersist().isTokens()) {
long consensusTimestamp = recordItem.getConsensusTimestamp();
TokenUnpauseTransactionBody transactionBody = recordItem.getTransactionBody().getTokenUnpause();
Token token = Token.of(EntityId.of(transactionBody.getToken()));
token.setPauseStatus(TokenPauseStatusEnum.UNPAUSED);
updateToken(token, consensusTimestamp);
}
}
Aggregations