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