Updated on 2026-08-14

This commit is contained in:
Tangem 2025-10-07 21:21:36 +05:00
parent 480bfdd412
commit 971c419623
3 changed files with 4 additions and 3 deletions

View file

@ -15,7 +15,7 @@ import retrofit2.http.Query
interface YieldSupplyApi { interface YieldSupplyApi {
@GET("api/v1/yield/markets") @GET("api/v1/yield/markets")
suspend fun getYieldMarkets(@Query("chainId") chainId: Int? = null): ApiResponse<YieldMarketsResponse> suspend fun getYieldMarkets(@Query("chainId") chainId: String? = null): ApiResponse<YieldMarketsResponse>
@GET("api/v1/yield/token/{chainId}/{tokenAddress}") @GET("api/v1/yield/token/{chainId}/{tokenAddress}")
suspend fun getYieldTokenStatus( suspend fun getYieldTokenStatus(

View file

@ -39,7 +39,8 @@ internal class DefaultYieldSupplyRepository(
} }
override suspend fun updateMarkets(): List<YieldMarketToken> = withContext(dispatchers.io) { override suspend fun updateMarkets(): List<YieldMarketToken> = withContext(dispatchers.io) {
val response = yieldSupplyApi.getYieldMarkets().getOrThrow() val chains = Blockchain.yieldSupplySupportedBlockchains().map { it.getChainId() }.joinToString(",")
val response = yieldSupplyApi.getYieldMarkets(chainId = chains).getOrThrow()
val domain = response.marketDtos.map(YieldMarketTokenConverter::convert) val domain = response.marketDtos.map(YieldMarketTokenConverter::convert)
store.store(response.marketDtos) store.store(response.marketDtos)
domain domain

View file

@ -5,7 +5,7 @@
# https://github.com/tangem/tangem-sdk-android/ # https://github.com/tangem/tangem-sdk-android/
# https://github.com/tangem/vico # https://github.com/tangem/vico
tangemBlockchainSdk = "develop-1257" tangemBlockchainSdk = "develop-1259"
#tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds #tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds
tangemCardSdk = "develop-564" tangemCardSdk = "develop-564"
#tangemCardSdk = "0.0.1" # Keep it! - used for local builds ^ #tangemCardSdk = "0.0.1" # Keep it! - used for local builds ^