Updated on 2026-08-14

This commit is contained in:
Tangem 2025-10-17 14:27:13 +05:00
parent 56b509927c
commit 6afae8e619
4 changed files with 16 additions and 10 deletions

View file

@ -1267,16 +1267,7 @@ internal class SwapModel @Inject constructor(
toToken.currency.id.value
}
return groupToFind.available.find { idToFind == it.currencyStatus.currency.id.value }?.providers
?.filter { provider ->
// !!!WARNING!!! Filter out dex provider if yield supply is active
val yieldSupplyStatus = fromToken.value.yieldSupplyStatus
if (yieldSupplyStatus != null && yieldSupplyStatus.isActive) {
provider.type == ExchangeProviderType.CEX
} else {
true
}
}.orEmpty()
return groupToFind.available.find { idToFind == it.currencyStatus.currency.id.value }?.providers.orEmpty()
}
private fun Map<SwapProvider, SwapState>.getLastLoadedSuccessStates(): SuccessLoadedSwapData {