Updated on 2026-08-14

This commit is contained in:
Tangem 2023-10-11 19:13:33 +08:00
parent 7df5f9edc2
commit 8027be74aa
4 changed files with 10 additions and 8 deletions

View file

@ -45,7 +45,6 @@ import com.tangem.tap.common.analytics.handlers.appsFlyer.AppsFlyerAnalyticsHand
import com.tangem.tap.common.analytics.handlers.firebase.FirebaseAnalyticsHandler
import com.tangem.tap.common.analytics.topup.TopUpController
import com.tangem.tap.common.chat.ChatManager
import com.tangem.tap.common.extensions.dispatchOnMain
import com.tangem.tap.common.feedback.AdditionalFeedbackInfo
import com.tangem.tap.common.feedback.FeedbackManager
import com.tangem.tap.common.images.createCoilImageLoader
@ -240,10 +239,10 @@ internal class TapApplication : Application(), ImageLoaderFactory {
// TODO: Try to performance and user experience.
// [REDACTED_JIRA]
runBlocking {
walletsRepository.initialize()
initUserWalletsListManager()
featureTogglesManager.init()
appRatingRepository.initialize()
walletsRepository.initialize()
// learn2earnInteractor.init()
}
@ -416,6 +415,6 @@ internal class TapApplication : Application(), ImageLoaderFactory {
UserWalletsListManager.provideRuntimeImplementation()
}
store.dispatchOnMain(GlobalAction.UpdateUserWalletsListManager(manager))
store.dispatch(GlobalAction.UpdateUserWalletsListManager(manager))
}
}

View file

@ -217,9 +217,12 @@ internal class CurrenciesStatusesOperations(
private fun getQuotes(tokensIds: NonEmptySet<CryptoCurrency.ID>): Flow<Either<Error, Set<Quote>>> {
return quotesRepository.getQuotesUpdates(tokensIds)
.map<Set<Quote>, Either<Error, Set<Quote>>> { it.right() }
.catch { emit(Error.DataError(it).left()) }
.onEmpty { emit(Error.EmptyQuotes.left()) }
.map<Set<Quote>, Either<Error, Set<Quote>>> { quotes ->
if (quotes.isEmpty()) Error.EmptyQuotes.left() else quotes.right()
}
.catch {
emit(Error.DataError(it).left())
}
}
private fun getNetworksStatuses(networks: NonEmptySet<Network>): Flow<Either<Error, Set<NetworkStatus>>> {

View file

@ -101,7 +101,7 @@ internal class GetPrimaryCurrencyStatusUpdatesUseCaseTest {
fun `when quotes flow is empty then no quote status should be received`() = runTest {
val expectedResult = MockTokensStates.noQuotesTokensStatuses.first().right()
val useCase = getUseCase(quotes = flowOf())
val useCase = getUseCase(quotes = flowOf(emptySet<Quote>().right()))
// When
val result = useCase(userWalletId).first()

View file

@ -269,7 +269,7 @@ internal class GetTokenListUseCaseTest {
val useCase = getUseCase(
statuses = flowOf(MockNetworks.verifiedNetworksStatuses.right()),
quotes = flowOf(),
quotes = flowOf(emptySet<Quote>().right()),
)
// When