From e2b529221089d18b293be26d1f9bdac035ccc12b Mon Sep 17 00:00:00 2001 From: Ilya Shulgin Date: Wed, 9 Oct 2024 11:13:55 +0300 Subject: [PATCH] AND-8709 Fixed balance updating. --- .../com/tangem/data/staking/DefaultStakingRepository.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/data/staking/src/main/java/com/tangem/data/staking/DefaultStakingRepository.kt b/data/staking/src/main/java/com/tangem/data/staking/DefaultStakingRepository.kt index c770011062..67a37d7b85 100644 --- a/data/staking/src/main/java/com/tangem/data/staking/DefaultStakingRepository.kt +++ b/data/staking/src/main/java/com/tangem/data/staking/DefaultStakingRepository.kt @@ -56,6 +56,7 @@ import com.tangem.utils.extensions.orZero import kotlinx.coroutines.flow.* import kotlinx.coroutines.launch import kotlinx.coroutines.withContext +import timber.log.Timber @Suppress("LargeClass", "LongParameterList", "TooManyFunctions") internal class DefaultStakingRepository( @@ -305,7 +306,10 @@ internal class DefaultStakingRepository( if (integrationId == null || address.isNullOrBlank()) { cacheRegistry.invalidate(getYieldBalancesKey(userWalletId)) - error("IntegrationId or address is null") + Timber.w( + "IntegrationId or address is null fetching ${cryptoCurrency.name} staking balance", + ) + return@invokeOnExpire } val requestBody = getBalanceRequestData(address, integrationId)