Updated on 2026-08-14
This commit is contained in:
parent
ae8593b73b
commit
be70d69092
4 changed files with 6 additions and 10 deletions
|
|
@ -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>
|
||||
}
|
||||
|
|
@ -4,4 +4,4 @@ import com.squareup.moshi.Json
|
|||
|
||||
data class AssetsRequestBody(
|
||||
@Json(name = "filter") val filter: List<LeastTokenInfo>?,
|
||||
)
|
||||
)
|
||||
|
|
@ -8,4 +8,4 @@ data class PairsRequestBody(
|
|||
|
||||
@Json(name = "to")
|
||||
val to: List<LeastTokenInfo>,
|
||||
)
|
||||
)
|
||||
|
|
@ -25,5 +25,5 @@ data class Asset(
|
|||
val isActive: Boolean,
|
||||
|
||||
@Json(name = "exchangeAvailable")
|
||||
val exchangeAvailable: Boolean
|
||||
val exchangeAvailable: Boolean,
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue