Updated on 2026-08-14
This commit is contained in:
parent
cde97de92e
commit
609268c1a2
2 changed files with 3 additions and 5 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue