Updated on 2026-08-14

This commit is contained in:
Tangem 2023-11-02 19:09:10 +02:00
parent ae8593b73b
commit be70d69092
4 changed files with 6 additions and 10 deletions

View file

@ -14,6 +14,7 @@ import java.math.BigDecimal
/**
* Interface of Tangem Express API (new swap mechanism)
*/
@Suppress("LongParameterList")
interface ExpressApi {
// TODO move first three params to retrofit interceptor
@ -26,9 +27,7 @@ interface ExpressApi {
): ApiResponse<List<Asset>>
@POST("pairs")
suspend fun getPairs(
@Body body: PairsRequestBody,
): ApiResponse<List<SwapPair>>
suspend fun getPairs(@Body body: PairsRequestBody): ApiResponse<List<SwapPair>>
@GET("providers")
suspend fun getProviders(): ApiResponse<List<ExchangeProvider>>
@ -57,8 +56,5 @@ interface ExpressApi {
): ApiResponse<ExchangeDataResponse>
@GET("exchange-results")
suspend fun getExchangeResults(
@Query("txId") txId: String,
): ApiResponse<ExchangeResultsResponse>
suspend fun getExchangeResults(@Query("txId") txId: String): ApiResponse<ExchangeResultsResponse>
}

View file

@ -4,4 +4,4 @@ import com.squareup.moshi.Json
data class AssetsRequestBody(
@Json(name = "filter") val filter: List<LeastTokenInfo>?,
)
)

View file

@ -8,4 +8,4 @@ data class PairsRequestBody(
@Json(name = "to")
val to: List<LeastTokenInfo>,
)
)

View file

@ -25,5 +25,5 @@ data class Asset(
val isActive: Boolean,
@Json(name = "exchangeAvailable")
val exchangeAvailable: Boolean
val exchangeAvailable: Boolean,
)