Updated on 2026-08-14
This commit is contained in:
parent
c77a38ace4
commit
2adf3e50a6
7 changed files with 218 additions and 52 deletions
|
|
@ -10,6 +10,6 @@ import retrofit2.http.POST;
|
|||
|
||||
public interface RippleApi {
|
||||
@Headers("Content-Type: application/json")
|
||||
@POST
|
||||
@POST("./")
|
||||
Call<RippleResponse> ripple(@Body RippleBody body);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ public class ServerApiRipple {
|
|||
private ResponseListener responseListener;
|
||||
|
||||
public interface ResponseListener {
|
||||
void onSuccess(String method, RippleResponse infuraResponse);
|
||||
void onSuccess(String method, RippleResponse rippleResponse);
|
||||
|
||||
void onFail(String method, String message);
|
||||
}
|
||||
|
|
@ -45,9 +45,9 @@ public class ServerApiRipple {
|
|||
responseListener = listener;
|
||||
}
|
||||
|
||||
public void requestData(String method, int id, String wallet, String tx) {
|
||||
public void requestData(String method, String wallet, String tx) {
|
||||
requestsCount++;
|
||||
String rippleURL = "http://s1.ripple.com:51234/"; //TODO: make random selection
|
||||
String rippleURL = "https://s1.ripple.com:51234"; //TODO: make random selection
|
||||
lastNode = rippleURL; //TODO: show node instead of URL
|
||||
|
||||
Retrofit retrofitRipple = new Retrofit.Builder()
|
||||
|
|
|
|||
|
|
@ -19,12 +19,21 @@ data class RippleResult(
|
|||
var drops: FeeDrops? = null,
|
||||
|
||||
//for RIPPLE_SUBMIT
|
||||
@SerializedName("engine_result")
|
||||
var engine_result: String? = null,
|
||||
@SerializedName("engine_result_code")
|
||||
var engine_result_code: Int? = null,
|
||||
|
||||
//for RIPPLE_SUBMIT
|
||||
@SerializedName ("engine_result_message")
|
||||
var engine_result_message: String? = null
|
||||
var engine_result_message: String? = null,
|
||||
|
||||
//for RIPPLE_SUBMIT
|
||||
@SerializedName("error")
|
||||
var error: String? = null,
|
||||
|
||||
//for RIPPLE_SUBMIT
|
||||
@SerializedName("error_exception")
|
||||
var error_exception: String? = null
|
||||
|
||||
)
|
||||
|
||||
data class RippleAccountData(
|
||||
|
|
@ -35,7 +44,7 @@ data class RippleAccountData(
|
|||
var balance: String? = null,
|
||||
|
||||
@SerializedName("Sequence")
|
||||
var sequence: Int? = null
|
||||
var sequence: Long? = null
|
||||
)
|
||||
|
||||
data class FeeDrops(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue