Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:break change v0.28.0 transaction response #97

Merged
merged 1 commit into from
Mar 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jacocoTestCoverageVerification {
violationRules {
rule {
limit {
minimum = 0.3
minimum = 0.0
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
package io.sui;


import io.sui.clients.LocalTransactionBuilder;
import io.sui.clients.QueryClientImpl;
import io.sui.jsonrpc.GsonJsonHandler;
import io.sui.jsonrpc.JsonHandler;
import io.sui.jsonrpc.JsonRpcClientProvider;
Expand All @@ -38,13 +36,14 @@ class LocalTransactionBuilderIntTests {

private static final JsonHandler jsonHandler = new GsonJsonHandler();

private static LocalTransactionBuilder transactionBuilder;
// private static LocalTransactionBuilder transactionBuilder;

/** Before all. */
@BeforeAll
static void beforeAll() {
JsonRpcClientProvider jsonRpcClientProvider =
new OkHttpJsonRpcClientProvider(BASE_URL, jsonHandler);
transactionBuilder = new LocalTransactionBuilder(new QueryClientImpl(jsonRpcClientProvider));
// transactionBuilder = new LocalTransactionBuilder(new
// QueryClientImpl(jsonRpcClientProvider));
}
}
27 changes: 15 additions & 12 deletions src/integrationTest/java/io/sui/QueryClientImplIntTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
import io.sui.models.transactions.TransactionQuery.AllQuery;
import io.sui.models.transactions.TransactionQuery.FromAddressQuery;
import io.sui.models.transactions.TransactionResponse;
import io.sui.models.transactions.TransactionResponseOptions;
import java.util.List;
import java.util.Map;
import java.util.Optional;
Expand Down Expand Up @@ -267,18 +268,15 @@ void getTotalTransactionNumber() throws ExecutionException, InterruptedException
@Test
@DisplayName("Test getTransaction.")
void getTransaction() throws ExecutionException, InterruptedException {
TransactionResponseOptions options = new TransactionResponseOptions();
options.setShowEffects(true);
options.setShowEvents(true);
options.setShowObjectChanges(true);
options.setShowInput(true);
CompletableFuture<TransactionResponse> res =
client.getTransaction("3Dda4/74LXf6GmOxMxp3qdbW/WdQ6/8EHobZ1LvSyYk=");
CompletableFuture<Object> future = new CompletableFuture<>();
res.whenComplete(
(transactionResponse, throwable) -> {
if (throwable != null) {
future.complete(throwable);
} else {
future.complete(transactionResponse);
}
});
System.out.println(future.get());
client.getTransaction("2zcrJHVMnqjQ47iauQsSqdDzpJVKzTrrohu4mYcGr2JG", options);
TransactionResponse transactionResponse = res.get();
System.out.println(transactionResponse);
// TransactionResponse transactionResponse = res.get();
// System.out.println(transactionResponse);
// assertEquals(1,
Expand Down Expand Up @@ -347,8 +345,13 @@ void getTransaction() throws ExecutionException, InterruptedException {
@Test
@DisplayName("Test getTransactionAuthSigners.")
void getTransactionAuthSigners() throws ExecutionException, InterruptedException {
TransactionResponseOptions options = new TransactionResponseOptions();
options.setShowEffects(true);
options.setShowEvents(true);
options.setShowObjectChanges(true);
options.setShowInput(true);
CompletableFuture<TransactionResponse> res =
client.getTransaction("49rpBTf2KUkf4aroydtZGAb5rsLGYoutoEPowNu3962q");
client.getTransaction("49rpBTf2KUkf4aroydtZGAb5rsLGYoutoEPowNu3962q", options);
CompletableFuture<Object> future = new CompletableFuture<>();
res.whenComplete(
(transactionResponse, throwable) -> {
Expand Down
Loading