From e727b40042973d9cee2b79d447523ac863ac3589 Mon Sep 17 00:00:00 2001 From: Tangem Date: Fri, 25 Jul 2025 21:55:59 +0500 Subject: [PATCH] Updated on 2026-08-14 --- features/hot-wallet/impl/build.gradle.kts | 1 + .../port/AddExistingWalletImportComponent.kt | 2 +- .../port/di/AddExistingWalletImportModule.kt | 20 +++++++ .../model/AddExistingWalletImportModel.kt | 6 ++ .../root/AddExistingWalletModel.kt | 58 ++++++++++++++++--- .../root/DefaultAddExistingWalletComponent.kt | 3 +- .../root/di/AddExistingWalletModule.kt | 24 +------- .../routing/AddExistingWalletChildFactory.kt | 20 ++++++- .../root/routing/AddExistingWalletRoute.kt | 8 ++- .../start/di/AddExistingWalletStartModule.kt | 20 +++++++ ...leBinds.kt => CreateMobileWalletModule.kt} | 2 +- .../di/ManualBackupCompletedModule.kt | 20 +++++++ .../setaccesscode/di/SetAccessCodeModule.kt | 20 +++++++ .../di/MobileWalletSetupFinishedModule.kt | 20 +++++++ 14 files changed, 186 insertions(+), 38 deletions(-) create mode 100644 features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/im/port/di/AddExistingWalletImportModule.kt create mode 100644 features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/start/di/AddExistingWalletStartModule.kt rename features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/createmobilewallet/di/{CreateMobileWalletModuleBinds.kt => CreateMobileWalletModule.kt} (94%) create mode 100644 features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/manualbackup/completed/di/ManualBackupCompletedModule.kt create mode 100644 features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/setaccesscode/di/SetAccessCodeModule.kt create mode 100644 features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/setupfinished/di/MobileWalletSetupFinishedModule.kt diff --git a/features/hot-wallet/impl/build.gradle.kts b/features/hot-wallet/impl/build.gradle.kts index 09ab226d38..c740fecd23 100644 --- a/features/hot-wallet/impl/build.gradle.kts +++ b/features/hot-wallet/impl/build.gradle.kts @@ -32,6 +32,7 @@ dependencies { implementation(projects.domain.wallets) implementation(projects.domain.wallets.models) implementation(projects.domain.models) + implementation(projects.domain.settings) /** Common */ implementation(projects.common.ui) diff --git a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/im/port/AddExistingWalletImportComponent.kt b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/im/port/AddExistingWalletImportComponent.kt index c6a56a4194..afd76f5987 100644 --- a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/im/port/AddExistingWalletImportComponent.kt +++ b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/im/port/AddExistingWalletImportComponent.kt @@ -28,7 +28,7 @@ internal class AddExistingWalletImportComponent @AssistedInject constructor( } interface ModelCallbacks { - fun onBackClick() + fun onWalletImported() } data class Params( diff --git a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/im/port/di/AddExistingWalletImportModule.kt b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/im/port/di/AddExistingWalletImportModule.kt new file mode 100644 index 0000000000..c95eeb4b73 --- /dev/null +++ b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/im/port/di/AddExistingWalletImportModule.kt @@ -0,0 +1,20 @@ +package com.tangem.features.hotwallet.addexistingwallet.im.port.di + +import com.tangem.core.decompose.model.Model +import com.tangem.features.hotwallet.addexistingwallet.im.port.model.AddExistingWalletImportModel +import dagger.Binds +import dagger.Module +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import dagger.multibindings.ClassKey +import dagger.multibindings.IntoMap + +@Module +@InstallIn(SingletonComponent::class) +internal interface AddExistingWalletImportModule { + + @Binds + @IntoMap + @ClassKey(AddExistingWalletImportModel::class) + fun bindAddExistingWalletImportModel(model: AddExistingWalletImportModel): Model +} \ No newline at end of file diff --git a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/im/port/model/AddExistingWalletImportModel.kt b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/im/port/model/AddExistingWalletImportModel.kt index 502b2ccff9..2f70fa2273 100644 --- a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/im/port/model/AddExistingWalletImportModel.kt +++ b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/im/port/model/AddExistingWalletImportModel.kt @@ -2,8 +2,10 @@ package com.tangem.features.hotwallet.addexistingwallet.im.port.model import com.tangem.core.decompose.di.ModelScoped import com.tangem.core.decompose.model.Model +import com.tangem.core.decompose.model.ParamsContainer import com.tangem.crypto.bip39.Mnemonic import com.tangem.features.hotwallet.MnemonicRepository +import com.tangem.features.hotwallet.addexistingwallet.im.port.AddExistingWalletImportComponent import com.tangem.features.hotwallet.addexistingwallet.im.port.entity.AddExistingWalletImportUM import com.tangem.utils.coroutines.CoroutineDispatcherProvider import kotlinx.coroutines.flow.MutableStateFlow @@ -13,10 +15,13 @@ import javax.inject.Inject @ModelScoped internal class AddExistingWalletImportModel @Inject constructor( + paramsContainer: ParamsContainer, override val dispatchers: CoroutineDispatcherProvider, private val mnemonicRepository: MnemonicRepository, ) : Model() { + private val params: AddExistingWalletImportComponent.Params = paramsContainer.require() + private val importSeedPhraseUiStateBuilder: ImportSeedPhraseUiStateBuilder init { @@ -40,5 +45,6 @@ internal class AddExistingWalletImportModel @Inject constructor( @Suppress("UnusedPrivateMember") private fun importWallet(mnemonic: Mnemonic, passphrase: String?) { // TODO implement importing seed phrase + params.callbacks.onWalletImported() } } \ No newline at end of file diff --git a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/root/AddExistingWalletModel.kt b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/root/AddExistingWalletModel.kt index da289198f7..92b04ffe28 100644 --- a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/root/AddExistingWalletModel.kt +++ b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/root/AddExistingWalletModel.kt @@ -3,30 +3,51 @@ package com.tangem.features.hotwallet.addexistingwallet.root import com.arkivanov.decompose.router.stack.StackNavigation import com.arkivanov.decompose.router.stack.pop import com.arkivanov.decompose.router.stack.push +import com.arkivanov.decompose.router.stack.replaceCurrent +import com.tangem.common.routing.AppRoute import com.tangem.core.decompose.di.ModelScoped import com.tangem.core.decompose.model.Model import com.tangem.core.decompose.navigation.Router +import com.tangem.domain.settings.ShouldAskPermissionUseCase import com.tangem.features.hotwallet.setaccesscode.SetAccessCodeComponent import com.tangem.features.hotwallet.addexistingwallet.start.AddExistingWalletStartComponent import com.tangem.features.hotwallet.addexistingwallet.im.port.AddExistingWalletImportComponent import com.tangem.features.hotwallet.addexistingwallet.root.routing.AddExistingWalletRoute +import com.tangem.features.hotwallet.manualbackup.completed.ManualBackupCompletedComponent +import com.tangem.features.hotwallet.setupfinished.MobileWalletSetupFinishedComponent import com.tangem.features.pushnotifications.api.PushNotificationsComponent +import com.tangem.features.pushnotifications.api.utils.PUSH_PERMISSION import com.tangem.utils.coroutines.CoroutineDispatcherProvider +import kotlinx.coroutines.launch import javax.inject.Inject @ModelScoped internal class AddExistingWalletModel @Inject constructor( override val dispatchers: CoroutineDispatcherProvider, private val router: Router, + private val shouldAskPermissionUseCase: ShouldAskPermissionUseCase, ) : Model() { val addExistingWalletStartModelCallbacks = AddExistingWalletStartModelCallbacks() val addExistingWalletImportModelCallbacks = AddExistingWalletImportModelCallbacks() - val pushNotificationsComponentModelCallbacks = PushNotificationsComponentModelCallbacks() + val manualBackupCompletedComponentModelCallbacks = ManualBackupCompletedComponentModelCallbacks() val accessCodeModelCallbacks = AccessCodeModelCallbacks() + val pushNotificationsComponentModelCallbacks = PushNotificationsComponentModelCallbacks() + val mobileWalletSetupFinishedComponentModelCallbacks = MobileWalletSetupFinishedComponentModelCallbacks() val stackNavigation = StackNavigation() + fun onChildBack(currentRoute: AddExistingWalletRoute) { + when (currentRoute) { + AddExistingWalletRoute.Import -> stackNavigation.pop() + AddExistingWalletRoute.BackupCompleted -> Unit + AddExistingWalletRoute.AccessCode -> stackNavigation.pop() + AddExistingWalletRoute.PushNotifications -> Unit + AddExistingWalletRoute.SetupFinished -> Unit + AddExistingWalletRoute.Start -> Unit + } + } + inner class AddExistingWalletStartModelCallbacks : AddExistingWalletStartComponent.ModelCallbacks { override fun onBackClick() { router.pop() @@ -38,24 +59,45 @@ internal class AddExistingWalletModel @Inject constructor( } inner class AddExistingWalletImportModelCallbacks : AddExistingWalletImportComponent.ModelCallbacks { - override fun onBackClick() { - stackNavigation.pop() + override fun onWalletImported() { + stackNavigation.replaceCurrent(AddExistingWalletRoute.BackupCompleted) } } - inner class PushNotificationsComponentModelCallbacks : PushNotificationsComponent.ModelCallbacks { - override fun onResult() { - // TODO [REDACTED_TASK_KEY] + inner class ManualBackupCompletedComponentModelCallbacks : ManualBackupCompletedComponent.ModelCallbacks { + override fun onContinueClick() { + stackNavigation.push(AddExistingWalletRoute.AccessCode) } } inner class AccessCodeModelCallbacks : SetAccessCodeComponent.ModelCallbacks { override fun onBackClick() { - // TODO [REDACTED_TASK_KEY] + stackNavigation.pop() } override fun onAccessCodeSet() { - // TODO [REDACTED_TASK_KEY] + modelScope.launch { + val shouldRequestPush = shouldAskPermissionUseCase(PUSH_PERMISSION) + if (shouldRequestPush) { + // is yet blocked by [REDACTED_TASK_KEY] + // stackNavigation.replaceCurrent(AddExistingWalletRoute.PushNotifications) + stackNavigation.replaceCurrent(AddExistingWalletRoute.SetupFinished) + } else { + stackNavigation.replaceCurrent(AddExistingWalletRoute.SetupFinished) + } + } + } + } + + inner class PushNotificationsComponentModelCallbacks : PushNotificationsComponent.ModelCallbacks { + override fun onResult() { + stackNavigation.replaceCurrent(AddExistingWalletRoute.SetupFinished) + } + } + + inner class MobileWalletSetupFinishedComponentModelCallbacks : MobileWalletSetupFinishedComponent.ModelCallbacks { + override fun onContinueClick() { + router.replaceAll(AppRoute.Wallet) } } } \ No newline at end of file diff --git a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/root/DefaultAddExistingWalletComponent.kt b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/root/DefaultAddExistingWalletComponent.kt index 104d2582c2..1792942faf 100644 --- a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/root/DefaultAddExistingWalletComponent.kt +++ b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/root/DefaultAddExistingWalletComponent.kt @@ -59,7 +59,8 @@ internal class DefaultAddExistingWalletComponent @AssistedInject constructor( if (isEmptyStack) { router.pop() } else { - model.stackNavigation.pop() + val currentRoute = innerStack.value.active.configuration + model.onChildBack(currentRoute) } } diff --git a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/root/di/AddExistingWalletModule.kt b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/root/di/AddExistingWalletModule.kt index 8112462b14..0c6a950236 100644 --- a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/root/di/AddExistingWalletModule.kt +++ b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/root/di/AddExistingWalletModule.kt @@ -2,11 +2,8 @@ package com.tangem.features.hotwallet.addexistingwallet.root.di import com.tangem.core.decompose.model.Model import com.tangem.features.hotwallet.AddExistingWalletComponent -import com.tangem.features.hotwallet.setaccesscode.SetAccessCodeModel import com.tangem.features.hotwallet.addexistingwallet.root.AddExistingWalletModel import com.tangem.features.hotwallet.addexistingwallet.root.DefaultAddExistingWalletComponent -import com.tangem.features.hotwallet.addexistingwallet.start.AddExistingWalletStartModel -import com.tangem.features.hotwallet.addexistingwallet.im.port.model.AddExistingWalletImportModel import dagger.Binds import dagger.Module import dagger.hilt.InstallIn @@ -17,11 +14,7 @@ import javax.inject.Singleton @Module @InstallIn(SingletonComponent::class) -internal object AddExistingWalletModule - -@Module -@InstallIn(SingletonComponent::class) -internal interface AddExistingWalletModuleBinds { +internal interface AddExistingWalletModule { @Binds @Singleton @@ -33,19 +26,4 @@ internal interface AddExistingWalletModuleBinds { @IntoMap @ClassKey(AddExistingWalletModel::class) fun bindAddExistingWalletModel(model: AddExistingWalletModel): Model - - @Binds - @IntoMap - @ClassKey(AddExistingWalletStartModel::class) - fun bindAddExistingWalletStartModel(model: AddExistingWalletStartModel): Model - - @Binds - @IntoMap - @ClassKey(AddExistingWalletImportModel::class) - fun bindAddExistingWalletImportModel(model: AddExistingWalletImportModel): Model - - @Binds - @IntoMap - @ClassKey(SetAccessCodeModel::class) - fun bindAccessCodeModel(model: SetAccessCodeModel): Model } \ No newline at end of file diff --git a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/root/routing/AddExistingWalletChildFactory.kt b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/root/routing/AddExistingWalletChildFactory.kt index 301d9caff4..e4926281e5 100644 --- a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/root/routing/AddExistingWalletChildFactory.kt +++ b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/root/routing/AddExistingWalletChildFactory.kt @@ -6,6 +6,8 @@ import com.tangem.features.hotwallet.setaccesscode.SetAccessCodeComponent import com.tangem.features.hotwallet.addexistingwallet.root.AddExistingWalletModel import com.tangem.features.hotwallet.addexistingwallet.start.AddExistingWalletStartComponent import com.tangem.features.hotwallet.addexistingwallet.im.port.AddExistingWalletImportComponent +import com.tangem.features.hotwallet.manualbackup.completed.ManualBackupCompletedComponent +import com.tangem.features.hotwallet.setupfinished.MobileWalletSetupFinishedComponent import com.tangem.features.pushnotifications.api.PushNotificationsComponent import javax.inject.Inject @@ -31,10 +33,10 @@ internal class AddExistingWalletChildFactory @Inject constructor( callbacks = model.addExistingWalletImportModelCallbacks, ), ) - is AddExistingWalletRoute.PushNotifications -> pushNotificationsComponent.create( + is AddExistingWalletRoute.BackupCompleted -> ManualBackupCompletedComponent( context = childContext, - params = PushNotificationsComponent.Params.Callbacks( - callbacks = model.pushNotificationsComponentModelCallbacks, + params = ManualBackupCompletedComponent.Params( + callbacks = model.manualBackupCompletedComponentModelCallbacks, ), ) is AddExistingWalletRoute.AccessCode -> SetAccessCodeComponent( @@ -43,6 +45,18 @@ internal class AddExistingWalletChildFactory @Inject constructor( callbacks = model.accessCodeModelCallbacks, ), ) + is AddExistingWalletRoute.PushNotifications -> pushNotificationsComponent.create( + context = childContext, + params = PushNotificationsComponent.Params.Callbacks( + callbacks = model.pushNotificationsComponentModelCallbacks, + ), + ) + AddExistingWalletRoute.SetupFinished -> MobileWalletSetupFinishedComponent( + context = childContext, + params = MobileWalletSetupFinishedComponent.Params( + callbacks = model.mobileWalletSetupFinishedComponentModelCallbacks, + ), + ) } } } \ No newline at end of file diff --git a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/root/routing/AddExistingWalletRoute.kt b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/root/routing/AddExistingWalletRoute.kt index e38bdfdc60..c08f900605 100644 --- a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/root/routing/AddExistingWalletRoute.kt +++ b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/root/routing/AddExistingWalletRoute.kt @@ -12,8 +12,14 @@ internal sealed class AddExistingWalletRoute : Route { object Import : AddExistingWalletRoute() @Serializable - object PushNotifications : AddExistingWalletRoute() + object BackupCompleted : AddExistingWalletRoute() @Serializable object AccessCode : AddExistingWalletRoute() + + @Serializable + object PushNotifications : AddExistingWalletRoute() + + @Serializable + object SetupFinished : AddExistingWalletRoute() } \ No newline at end of file diff --git a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/start/di/AddExistingWalletStartModule.kt b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/start/di/AddExistingWalletStartModule.kt new file mode 100644 index 0000000000..7993b375d4 --- /dev/null +++ b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/start/di/AddExistingWalletStartModule.kt @@ -0,0 +1,20 @@ +package com.tangem.features.hotwallet.addexistingwallet.start.di + +import com.tangem.core.decompose.model.Model +import com.tangem.features.hotwallet.addexistingwallet.start.AddExistingWalletStartModel +import dagger.Binds +import dagger.Module +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import dagger.multibindings.ClassKey +import dagger.multibindings.IntoMap + +@Module +@InstallIn(SingletonComponent::class) +internal interface AddExistingWalletStartModule { + + @Binds + @IntoMap + @ClassKey(AddExistingWalletStartModel::class) + fun bindAddExistingWalletStartModel(model: AddExistingWalletStartModel): Model +} \ No newline at end of file diff --git a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/createmobilewallet/di/CreateMobileWalletModuleBinds.kt b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/createmobilewallet/di/CreateMobileWalletModule.kt similarity index 94% rename from features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/createmobilewallet/di/CreateMobileWalletModuleBinds.kt rename to features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/createmobilewallet/di/CreateMobileWalletModule.kt index 885165e2a1..553a2aa17e 100644 --- a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/createmobilewallet/di/CreateMobileWalletModuleBinds.kt +++ b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/createmobilewallet/di/CreateMobileWalletModule.kt @@ -13,7 +13,7 @@ import dagger.multibindings.IntoMap @Module @InstallIn(SingletonComponent::class) -internal interface CreateMobileWalletModuleBinds { +internal interface CreateMobileWalletModule { @Binds fun bindCreateMobileWalletComponentFactory( diff --git a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/manualbackup/completed/di/ManualBackupCompletedModule.kt b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/manualbackup/completed/di/ManualBackupCompletedModule.kt new file mode 100644 index 0000000000..d3c98a79cd --- /dev/null +++ b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/manualbackup/completed/di/ManualBackupCompletedModule.kt @@ -0,0 +1,20 @@ +package com.tangem.features.hotwallet.manualbackup.completed.di + +import com.tangem.core.decompose.model.Model +import com.tangem.features.hotwallet.manualbackup.completed.ManualBackupCompletedModel +import dagger.Binds +import dagger.Module +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import dagger.multibindings.ClassKey +import dagger.multibindings.IntoMap + +@Module +@InstallIn(SingletonComponent::class) +internal interface ManualBackupCompletedModule { + + @Binds + @IntoMap + @ClassKey(ManualBackupCompletedModel::class) + fun bindManualBackupCompletedModel(model: ManualBackupCompletedModel): Model +} \ No newline at end of file diff --git a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/setaccesscode/di/SetAccessCodeModule.kt b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/setaccesscode/di/SetAccessCodeModule.kt new file mode 100644 index 0000000000..fccaaac528 --- /dev/null +++ b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/setaccesscode/di/SetAccessCodeModule.kt @@ -0,0 +1,20 @@ +package com.tangem.features.hotwallet.setaccesscode.di + +import com.tangem.core.decompose.model.Model +import com.tangem.features.hotwallet.setaccesscode.SetAccessCodeModel +import dagger.Binds +import dagger.Module +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import dagger.multibindings.ClassKey +import dagger.multibindings.IntoMap + +@Module +@InstallIn(SingletonComponent::class) +internal interface SetAccessCodeModule { + + @Binds + @IntoMap + @ClassKey(SetAccessCodeModel::class) + fun bindSetAccessCodeModel(model: SetAccessCodeModel): Model +} \ No newline at end of file diff --git a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/setupfinished/di/MobileWalletSetupFinishedModule.kt b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/setupfinished/di/MobileWalletSetupFinishedModule.kt new file mode 100644 index 0000000000..a0cd1064c9 --- /dev/null +++ b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/setupfinished/di/MobileWalletSetupFinishedModule.kt @@ -0,0 +1,20 @@ +package com.tangem.features.hotwallet.setupfinished.di + +import com.tangem.core.decompose.model.Model +import com.tangem.features.hotwallet.setupfinished.MobileWalletSetupFinishedModel +import dagger.Binds +import dagger.Module +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import dagger.multibindings.ClassKey +import dagger.multibindings.IntoMap + +@Module +@InstallIn(SingletonComponent::class) +internal interface MobileWalletSetupFinishedModule { + + @Binds + @IntoMap + @ClassKey(MobileWalletSetupFinishedModel::class) + fun bindMobileWalletSetupFinishedModel(model: MobileWalletSetupFinishedModel): Model +} \ No newline at end of file