Updated on 2026-08-14
This commit is contained in:
parent
05a9671ed1
commit
cfc1c20a2e
3 changed files with 16 additions and 27 deletions
|
|
@ -26,5 +26,5 @@ public interface AdaliteApi {
|
|||
|
||||
@Headers("Content-Type: application/json")
|
||||
@POST(ServerApiAdalite.ADALITE_SEND)
|
||||
Call<List> adaliteSend(@Body AdaliteBody adaliteBody);
|
||||
Call<String> adaliteSend(@Body AdaliteBody adaliteBody);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ public class ServerApiAdalite {
|
|||
|
||||
private int requestsCount = 0;
|
||||
|
||||
private final String adaliteURL1 = "https://explorer2.adalite.io"; //TODO: make random selection, add more?, move
|
||||
private final String adaliteURL1 = "https://explorer3.adalite.io"; //TODO: make random selection, add more?, move
|
||||
private final String adaliteURL2 = "https://nodes.southeastasia.cloudapp.azure.com";
|
||||
|
||||
private String currentURL = adaliteURL1;
|
||||
|
|
@ -48,7 +48,7 @@ public class ServerApiAdalite {
|
|||
|
||||
void onSuccess(String method, AdaliteResponseUtxo adaliteResponseUtxo);
|
||||
|
||||
void onSuccess(String method, List listResponse);
|
||||
void onSuccess(String method, String stringResponse);
|
||||
|
||||
void onFail(String method, String message);
|
||||
}
|
||||
|
|
@ -145,10 +145,10 @@ public class ServerApiAdalite {
|
|||
break;
|
||||
|
||||
case ADALITE_SEND:
|
||||
Call<List> sendCall = adaliteApi.adaliteSend(new AdaliteBody(tx));
|
||||
sendCall.enqueue(new Callback<List>() {
|
||||
Call<String> sendCall = adaliteApi.adaliteSend(new AdaliteBody(tx));
|
||||
sendCall.enqueue(new Callback<String>() {
|
||||
@Override
|
||||
public void onResponse(@NonNull Call<List> call, @NonNull Response<List> response) {
|
||||
public void onResponse(@NonNull Call<String> call, @NonNull Response<String> response) {
|
||||
requestsCount--;
|
||||
|
||||
if (response.code() == 200) {
|
||||
|
|
@ -166,7 +166,7 @@ public class ServerApiAdalite {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(@NonNull Call<List> call, @NonNull Throwable t) {
|
||||
public void onFailure(@NonNull Call<String> call, @NonNull Throwable t) {
|
||||
Log.e(TAG, "requestData " + method + " onFailure " + t.getMessage());
|
||||
requestsCount--;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue