Updated on 2026-08-14
This commit is contained in:
parent
48f20925f6
commit
e35cd41fd2
2 changed files with 14 additions and 4 deletions
|
|
@ -16,7 +16,7 @@ import dagger.hilt.android.scopes.ViewModelScoped
|
|||
|
||||
@Module
|
||||
@InstallIn(ViewModelComponent::class)
|
||||
@Suppress("TooManyFunctions")
|
||||
@Suppress("TooManyFunctions", "LargeClass")
|
||||
internal object TokensDomainModule {
|
||||
|
||||
@Provides
|
||||
|
|
|
|||
|
|
@ -54,7 +54,11 @@ internal object UseCaseScanProcessor {
|
|||
) = progressScope(onProgressStateChange) {
|
||||
val scanCardUseCase = store.inject(DaggerGraphState::scanCardUseCase)
|
||||
val chains = buildList {
|
||||
add(FailedScansCounterChain(UseCaseScanProcessor::showMaxUnsuccessfulScansReachedDialog))
|
||||
add(
|
||||
FailedScansCounterChain(
|
||||
{ showMaxUnsuccessfulScansReachedDialog(analyticsSource) },
|
||||
),
|
||||
)
|
||||
add(AnalyticsChain(Basic.CardWasScanned(analyticsSource)))
|
||||
add(DisclaimerChain(store, disclaimerWillShow))
|
||||
add(CheckForOnboardingChain(store, store.state.globalState.tapWalletManager))
|
||||
|
|
@ -66,8 +70,14 @@ internal object UseCaseScanProcessor {
|
|||
)
|
||||
}
|
||||
|
||||
private fun showMaxUnsuccessfulScansReachedDialog() {
|
||||
store.dispatchDialogShow(StateDialog.ScanFailsDialog)
|
||||
private fun showMaxUnsuccessfulScansReachedDialog(source: AnalyticsParam.ScreensSources) {
|
||||
val scanFailsSource = when (source) {
|
||||
is AnalyticsParam.ScreensSources.SignIn -> StateDialog.ScanFailsSource.SIGN_IN
|
||||
is AnalyticsParam.ScreensSources.Settings -> StateDialog.ScanFailsSource.SETTINGS
|
||||
is AnalyticsParam.ScreensSources.Intro -> StateDialog.ScanFailsSource.INTRO
|
||||
else -> StateDialog.ScanFailsSource.MAIN
|
||||
}
|
||||
store.dispatchDialogShow(StateDialog.ScanFailsDialog(scanFailsSource))
|
||||
}
|
||||
|
||||
private suspend fun proceedWithException(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue