Skip to content

Commit

Permalink
Complete GetSignatureStatuesContractTest
Browse files Browse the repository at this point in the history
  • Loading branch information
ml-james committed Nov 6, 2024
1 parent 7dd4af2 commit c4a1455
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ public String getJsonrpc()
return jsonrpc;
}

public int getId()
{
return id;
}

public Error getError()
{
return error;
Expand All @@ -58,7 +53,6 @@ public static class Error
{
private final long code;
private final String message;
// it can be String or Map<String, Object>
private final Object data;

@JsonCreator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public Context getContext()
}

@Override
@SuppressWarnings({"unchecked", "rawtypes"})
public List<SignatureStatus> getValue()
{
return (List) value;
Expand Down

0 comments on commit c4a1455

Please sign in to comment.