use of com.radixdlt.api.core.openapitools.model.ParsedTransactionMetadata in project radixdlt by radixdlt.
the class ConstructionParseHandler method handleRequest.
@Override
public ConstructionParseResponse handleRequest(ConstructionParseRequest request) throws CoreApiException {
modelMapper.verifyNetwork(request.getNetworkIdentifier());
var txn = modelMapper.bytes(request.getTransaction());
REProcessedTxn processed;
try {
processed = radixEngineStateComputer.test(txn, request.getSigned());
} catch (RadixEngineException e) {
throw modelMapper.radixEngineException(e);
}
var response = new ConstructionParseResponse();
var transaction = modelMapper.transaction(processed, this::symbol);
transaction.getOperationGroups().forEach(response::addOperationGroupsItem);
response.metadata(new ParsedTransactionMetadata().fee(transaction.getMetadata().getFee()).message(transaction.getMetadata().getMessage()));
return response;
}
Aggregations