Updated on 2026-08-14
This commit is contained in:
commit
479d554dae
14 changed files with 122 additions and 53 deletions
|
|
@ -6,7 +6,6 @@ import com.tangem.datasource.api.express.models.request.PairsRequestBody
|
|||
import com.tangem.datasource.api.express.models.response.*
|
||||
import retrofit2.http.Body
|
||||
import retrofit2.http.GET
|
||||
import retrofit2.http.Header
|
||||
import retrofit2.http.POST
|
||||
import retrofit2.http.Query
|
||||
import java.math.BigDecimal
|
||||
|
|
@ -17,14 +16,8 @@ import java.math.BigDecimal
|
|||
@Suppress("LongParameterList")
|
||||
interface ExpressApi {
|
||||
|
||||
// TODO move first three params to retrofit interceptor
|
||||
@POST("assets")
|
||||
suspend fun getAssets(
|
||||
@Header("api-key") apiKey: String,
|
||||
@Header("user-id") userId: String,
|
||||
@Header("session-id") sessionId: String,
|
||||
@Body body: AssetsRequestBody,
|
||||
): ApiResponse<List<Asset>>
|
||||
suspend fun getAssets(@Body body: AssetsRequestBody): ApiResponse<List<Asset>>
|
||||
|
||||
@POST("pairs")
|
||||
suspend fun getPairs(@Body body: PairsRequestBody): ApiResponse<List<SwapPair>>
|
||||
|
|
@ -55,6 +48,6 @@ interface ExpressApi {
|
|||
@Query("toAddress") toAddress: String,
|
||||
): ApiResponse<ExchangeDataResponse>
|
||||
|
||||
@GET("exchange-results")
|
||||
@GET("exchange-result")
|
||||
suspend fun getExchangeResults(@Query("txId") txId: String): ApiResponse<ExchangeResultsResponse>
|
||||
}
|
||||
|
|
@ -97,7 +97,7 @@ class NetworkModule {
|
|||
}
|
||||
|
||||
private companion object {
|
||||
const val PROD_EXPRESS_BASE_URL = "[REDACTED_ENV_URL]"
|
||||
const val PROD_EXPRESS_BASE_URL = "https://express.tangem.com/v1/"
|
||||
const val DEV_EXPRESS_BASE_URL = "[REDACTED_ENV_URL]"
|
||||
|
||||
const val PROD_TANGEM_TECH_BASE_URL = "https://api.tangem-tech.com/v1/"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue