Skip to content

Commit

Permalink
Add version attribute to Account view
Browse files Browse the repository at this point in the history
  • Loading branch information
ketola committed May 8, 2021
1 parent 5bbb5aa commit 9fa0856
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,7 @@ public interface Account {
@JsonProperty("is_frozen")
Boolean isFrozen();

@JsonProperty("version")
Long version();

}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void setUp() {
public void testGetAccount() throws Exception {
HttpResponse httpResponse = mock(HttpResponse.class);
when(httpResponse.body()).thenReturn(
"{\"diem_chain_id\":2,\"diem_ledger_version\":4867582,\"diem_ledger_timestampusec\":1604134778415882,\"jsonrpc\":\"2.0\",\"id\":\"5e0a1c17-d3ca-4813-817e-92f0680ccfdc\",\"result\":{\"address\":\"b3f7e8e38f8c8393f281a2f0792a2849\",\"authentication_key\":\"c0c19d6b1d48371ea28f0cdc5f74bba7b3f7e8e38f8c8393f281a2f0792a2849\",\"balances\":[{\"amount\":500000000,\"currency\":\"Coin1\"}],\"delegated_key_rotation_capability\":false,\"delegated_withdrawal_capability\":false,\"is_frozen\":false,\"received_events_key\":\"0200000000000000b3f7e8e38f8c8393f281a2f0792a2849\",\"role\":{\"base_url\":\"\",\"base_url_rotation_events_key\":\"0100000000000000b3f7e8e38f8c8393f281a2f0792a2849\",\"compliance_key\":\"\",\"compliance_key_rotation_events_key\":\"0000000000000000b3f7e8e38f8c8393f281a2f0792a2849\",\"expiration_time\":18446744073709551615,\"human_name\":\"No. 307\",\"num_children\":0,\"type\":\"parent_vasp\"},\"sent_events_key\":\"0300000000000000b3f7e8e38f8c8393f281a2f0792a2849\",\"sequence_number\":0}}");
"{\"diem_chain_id\":2,\"diem_ledger_version\":4867582,\"diem_ledger_timestampusec\":1604134778415882,\"jsonrpc\":\"2.0\",\"id\":\"5e0a1c17-d3ca-4813-817e-92f0680ccfdc\",\"result\":{\"address\":\"b3f7e8e38f8c8393f281a2f0792a2849\",\"authentication_key\":\"c0c19d6b1d48371ea28f0cdc5f74bba7b3f7e8e38f8c8393f281a2f0792a2849\",\"balances\":[{\"amount\":500000000,\"currency\":\"Coin1\"}],\"delegated_key_rotation_capability\":false,\"delegated_withdrawal_capability\":false,\"is_frozen\":false,\"received_events_key\":\"0200000000000000b3f7e8e38f8c8393f281a2f0792a2849\",\"role\":{\"base_url\":\"\",\"base_url_rotation_events_key\":\"0100000000000000b3f7e8e38f8c8393f281a2f0792a2849\",\"compliance_key\":\"\",\"compliance_key_rotation_events_key\":\"0000000000000000b3f7e8e38f8c8393f281a2f0792a2849\",\"expiration_time\":18446744073709551615,\"human_name\":\"No. 307\",\"num_children\":0,\"type\":\"parent_vasp\"},\"sent_events_key\":\"0300000000000000b3f7e8e38f8c8393f281a2f0792a2849\",\"sequence_number\":0,\"version\":1}}");
when(httpClient.sendAsync(Mockito.any(), Mockito.any()))
.thenReturn(CompletableFuture.completedFuture(httpResponse));

Expand Down
3 changes: 2 additions & 1 deletion jlibra-core/src/test/resources/batch_response_ok.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@
"type": "parent_vasp"
},
"sent_events_key": "0300000000000000b3f7e8e38f8c8393f281a2f0792a2849",
"sequence_number": 0
"sequence_number": 0,
"version": 1
}
}
]

0 comments on commit 9fa0856

Please sign in to comment.