Updated on 2026-08-14

This commit is contained in:
Tangem 2025-03-05 20:11:50 +05:00
parent cde97de92e
commit 609268c1a2
2 changed files with 3 additions and 5 deletions

View file

@ -204,11 +204,8 @@ internal class DefaultStakingBalanceStore(
private fun Set<YieldBalance>.getBalance(address: String?, integrationId: String?): YieldBalance? {
return firstOrNull { yieldBalance ->
val data = yieldBalance as? YieldBalance.Data
val balance = data?.balance
val isCorrectAddress = address != null && address == data?.address
val isCorrectIntegration = integrationId != null && balance?.integrationId == integrationId
val isCorrectAddress = address != null && address == yieldBalance.address
val isCorrectIntegration = integrationId != null && yieldBalance.integrationId == integrationId
isCorrectIntegration && isCorrectAddress
}

View file

@ -378,6 +378,7 @@ internal class DefaultStakingRepository(
} else {
FirebaseCrashlytics.getInstance()
.log("No yield balance available for currency ${cryptoCurrency.id.value}")
send(YieldBalance.Error(integrationId, address))
}
}
}