Skip to content

Commit

Permalink
feat: added middleware version from pom.xml (#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kammerlo authored Nov 11, 2024
1 parent f5cda70 commit 8a805e6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ public class NetworkServiceImpl implements NetworkService {
private String genesisShelleyPath;
@Value("${cardano.rosetta.CARDANO_NODE_VERSION}")
private String cardanoNodeVersion;
@Value("${cardano.rosetta.middleware-version}")
private String revision;

@PostConstruct
public void init() {
Expand All @@ -83,7 +85,6 @@ public NetworkOptionsResponse getNetworkOptions(NetworkRequest networkRequest) {
log.info("[networkOptions] Looking for networkOptions");

String rosettaVersion = getRosettaVersion();
String implementationVersion = rosettaConfig.getImplementationVersion();
OperationStatus success = new OperationStatus().successful(true)
.status(OperationTypeStatus.SUCCESS.getValue());
OperationStatus invalid = new OperationStatus().successful(false)
Expand All @@ -93,7 +94,7 @@ public NetworkOptionsResponse getNetworkOptions(NetworkRequest networkRequest) {
return NetworkOptionsResponse.builder()
.version(new Version().nodeVersion(cardanoNodeVersion)
.rosettaVersion(rosettaVersion)
.middlewareVersion(implementationVersion)
.middlewareVersion(revision)
.metadata(new LinkedHashMap<>()))
.allow(new Allow().operationStatuses(operationStatuses)
.operationTypes(
Expand Down
1 change: 1 addition & 0 deletions api/src/main/resources/config/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ cardano:
rosetta:
version:
${ROSETTA_VERSION}
middleware-version: '@revision@'
TOPOLOGY_FILEPATH: ${TOPOLOGY_FILEPATH}
GENESIS_SHELLEY_PATH: ${GENESIS_SHELLEY_PATH}
NODE_SUBMIT_API_PORT: ${NODE_SUBMIT_API_PORT}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,10 @@ cardano:
rosetta:
version:
${ROSETTA_VERSION}
implementation-version:
'1.0.0-SNAPSHOT'
middleware-version: '@revision@'
TOPOLOGY_FILEPATH: ${TOPOLOGY_FILEPATH:../config/devkit/topology.json}
GENESIS_SHELLEY_PATH: ${GENESIS_SHELLEY_PATH:../config/devkit/shelley-genesis.json}
CARDANO_NODE_VERSION: ${CARDANO_NODE_VERSION:8.9.0}
CARDANO_NODE_VERSION: ${CARDANO_NODE_VERSION:10.1.2}
CARDANO_NODE_SUBMIT_HOST: ${CARDANO_NODE_SUBMIT_HOST:localhost}
NODE_SUBMIT_API_PORT: ${NODE_SUBMIT_API_PORT:8090}
CARDANO_NODE_SOCKET_PATH: ${CARDANO_NODE_SOCKET_PATH:""}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</licenses>

<properties>
<revision>1.0.0</revision>
<revision>1.0.4</revision>
<java.version>21</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.spring-boot>3.2.4</version.spring-boot>
Expand Down

0 comments on commit 8a805e6

Please sign in to comment.