Updated on 2026-08-14

This commit is contained in:
Tangem 2019-03-27 13:31:05 +03:00
parent aed5a8558f
commit bacb21c115
5 changed files with 61 additions and 28 deletions

View file

@ -2,12 +2,10 @@ package com.tangem.data.network;
import android.util.Log;
import com.tangem.App;
import com.tangem.data.network.model.RippleBody;
import com.tangem.data.network.model.RippleResponse;
import java.util.HashMap;
import java.util.Map;
import androidx.annotation.NonNull;
import retrofit2.Call;
@ -23,8 +21,9 @@ public class ServerApiRipple {
public static final String RIPPLE_ACCOUNT_UNCONFIRMED = "account_unconfirmed";
public static final String RIPPLE_SUBMIT = "submit";
public static final String RIPPLE_FEE = "fee";
public static final String RIPPLE_SERVER_STATE = "server_state";
private int requestsCount=0;
private int requestsCount = 0;
public static String lastNode;
@ -76,6 +75,10 @@ public class ServerApiRipple {
rippleBody = new RippleBody(RIPPLE_ACCOUNT_INFO, paramsMap);
break;
case RIPPLE_SERVER_STATE:
rippleBody = new RippleBody(method, new HashMap<>());
break;
case RIPPLE_FEE:
rippleBody = new RippleBody(method, new HashMap<>());
break;

View file

@ -16,7 +16,7 @@ data class RippleResult(
//for RIPPLE_FEE
@SerializedName("drops")
var drops: FeeDrops? = null,
var drops: RippleFeeDrops? = null,
//for RIPPLE_SUBMIT
@SerializedName("engine_result_code")
@ -32,8 +32,11 @@ data class RippleResult(
//for RIPPLE_SUBMIT
@SerializedName("error_exception")
var error_exception: String? = null
var error_exception: String? = null,
//for RIPPLE_SERVER_STATE
@SerializedName("state")
var state: RippleState? = null
)
data class RippleAccountData(
@ -47,7 +50,7 @@ data class RippleAccountData(
var sequence: Long? = null
)
data class FeeDrops(
data class RippleFeeDrops(
//enough to put tx to queue
@SerializedName("minimum_fee")
var minimum_fee: String? = null,
@ -58,4 +61,14 @@ data class FeeDrops(
@SerializedName("median_fee")
var median_fee: String? = null
)
data class RippleState(
@SerializedName("validated_ledger")
var validated_ledger: RippleLedger? = null
)
data class RippleLedger(
@SerializedName("reserve_base")
var reserve_base: Long? = null
)