Updated on 2026-08-14
This commit is contained in:
parent
305e86960f
commit
db03d6d860
17 changed files with 80 additions and 29 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue