Updated on 2026-08-14

This commit is contained in:
Tangem 2025-10-20 19:47:53 +05:00
parent 305e86960f
commit db03d6d860
17 changed files with 80 additions and 29 deletions

View file

@ -102,10 +102,11 @@ internal class YieldSupplyActiveModel @Inject constructor(
private fun subscribeOnCurrencyUpdates() {
cryptoCurrencyStatusFlow.onEach { cryptoCurrencyStatus ->
val protocolBalance = yieldSupplyGetProtocolBalanceUseCase(
userWalletId = params.userWallet.walletId,
cryptoCurrency = cryptoCurrency,
).getOrNull()
val protocolBalance = cryptoCurrencyStatus.value.yieldSupplyStatus?.effectiveProtocolBalance
?: yieldSupplyGetProtocolBalanceUseCase(
userWalletId = params.userWallet.walletId,
cryptoCurrency = cryptoCurrency,
).getOrNull()
val approvalNotification = if (cryptoCurrencyStatus.value.yieldSupplyStatus?.isAllowedToSpend != true) {
NotificationUM.Error(