diff --git a/client/src/integration-test/java/com/lmax/solana4j/client/jsonrpc/GetSignatureStatuesContractTest.java b/client/src/integration-test/java/com/lmax/solana4j/client/jsonrpc/GetSignatureStatuesContractTest.java index bb294b25..96f638d3 100644 --- a/client/src/integration-test/java/com/lmax/solana4j/client/jsonrpc/GetSignatureStatuesContractTest.java +++ b/client/src/integration-test/java/com/lmax/solana4j/client/jsonrpc/GetSignatureStatuesContractTest.java @@ -31,6 +31,7 @@ void shouldGetSignatureStatusesDefaultOptionalParams() throws SolanaJsonRpcClien assertThat(signatureStatus1.getErr()).isNull(); assertThat(signatureStatus1.getSlot()).isGreaterThan(0L); assertThat(signatureStatus1.getConfirmationStatus()).isEqualTo(Commitment.FINALIZED); + assertThat(signatureStatus1.getStatus().getKey()).isEqualTo("Ok"); // number of blocks since signature confirmation, null if rooted, as well as finalized by a supermajority of the cluster // since we're finalized this is going to be null assertThat(signatureStatus1.getConfirmations()).isNull(); @@ -39,6 +40,7 @@ void shouldGetSignatureStatusesDefaultOptionalParams() throws SolanaJsonRpcClien assertThat(signatureStatus2.getErr()).isNull(); assertThat(signatureStatus2.getSlot()).isGreaterThan(0L); assertThat(signatureStatus2.getConfirmationStatus()).isEqualTo(Commitment.FINALIZED); + assertThat(signatureStatus2.getStatus().getKey()).isEqualTo("Ok"); // number of blocks since signature confirmation, null if rooted, as well as finalized by a supermajority of the cluster // since we're finalized this is going to be null assertThat(signatureStatus2.getConfirmations()).isNull(); @@ -47,6 +49,7 @@ void shouldGetSignatureStatusesDefaultOptionalParams() throws SolanaJsonRpcClien assertThat(signatureStatus3.getErr()).isNull(); assertThat(signatureStatus3.getSlot()).isGreaterThan(0L); assertThat(signatureStatus3.getConfirmationStatus()).isEqualTo(Commitment.FINALIZED); + assertThat(signatureStatus3.getStatus().getKey()).isEqualTo("Ok"); // number of blocks since signature confirmation, null if rooted, as well as finalized by a supermajority of the cluster // since we're finalized this is going to be null assertThat(signatureStatus3.getConfirmations()).isNull(); diff --git a/client/src/main/java/com/lmax/solana4j/client/jsonrpc/RpcWrapperDTO.java b/client/src/main/java/com/lmax/solana4j/client/jsonrpc/RpcWrapperDTO.java index 22bedd0f..1220a4e4 100644 --- a/client/src/main/java/com/lmax/solana4j/client/jsonrpc/RpcWrapperDTO.java +++ b/client/src/main/java/com/lmax/solana4j/client/jsonrpc/RpcWrapperDTO.java @@ -33,11 +33,6 @@ public String getJsonrpc() return jsonrpc; } - public int getId() - { - return id; - } - public Error getError() { return error; @@ -58,7 +53,6 @@ public static class Error { private final long code; private final String message; - // it can be String or Map private final Object data; @JsonCreator diff --git a/client/src/main/java/com/lmax/solana4j/client/jsonrpc/SignatureStatusesDTO.java b/client/src/main/java/com/lmax/solana4j/client/jsonrpc/SignatureStatusesDTO.java index 4b4a5216..1e4c4477 100644 --- a/client/src/main/java/com/lmax/solana4j/client/jsonrpc/SignatureStatusesDTO.java +++ b/client/src/main/java/com/lmax/solana4j/client/jsonrpc/SignatureStatusesDTO.java @@ -31,6 +31,7 @@ public Context getContext() } @Override + @SuppressWarnings({"unchecked", "rawtypes"}) public List getValue() { return (List) value;