Updated on 2026-08-14

This commit is contained in:
Tangem 2025-09-26 14:54:13 +05:00
parent 660defb213
commit c56b64bc36
4 changed files with 58 additions and 34 deletions

View file

@ -1263,7 +1263,15 @@ internal class SwapModel @Inject constructor(
}
return groupToFind.available.find { idToFind == it.currencyStatus.currency.id.value }?.providers
?: emptyList()
?.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()
}
private fun Map<SwapProvider, SwapState>.getLastLoadedSuccessStates(): SuccessLoadedSwapData {