Updated on 2026-08-14

This commit is contained in:
Tangem 2025-09-01 23:22:34 +05:00
parent 941863f79b
commit 411a591509
18 changed files with 453 additions and 43 deletions

View file

@ -1,5 +1,6 @@
package com.tangem.tap.di.domain
import com.tangem.domain.core.wallets.UserWalletsListRepository
import com.tangem.domain.redux.ReduxStateHolder
import com.tangem.domain.tokens.repository.CurrenciesRepository
import com.tangem.domain.transaction.WalletAddressServiceRepository
@ -9,8 +10,8 @@ import com.tangem.domain.transaction.usecase.ValidateWalletMemoUseCase
import com.tangem.domain.walletmanager.WalletManagersFacade
import com.tangem.domain.wallets.delegate.DefaultUserWalletsSyncDelegate
import com.tangem.domain.wallets.delegate.UserWalletsSyncDelegate
import com.tangem.domain.wallets.hot.HotWalletAccessor
import com.tangem.domain.wallets.legacy.UserWalletsListManager
import com.tangem.domain.core.wallets.UserWalletsListRepository
import com.tangem.domain.wallets.repository.WalletNamesMigrationRepository
import com.tangem.domain.wallets.repository.WalletsRepository
import com.tangem.domain.wallets.usecase.*
@ -372,4 +373,32 @@ internal object WalletsDomainModule {
walletsRepository = walletsRepository,
)
}
@Provides
@Singleton
fun providesUnlockHotWalletContextualUseCase(
hotWalletAccessor: HotWalletAccessor,
): UnlockHotWalletContextualUseCase {
return UnlockHotWalletContextualUseCase(
hotWalletAccessor = hotWalletAccessor,
)
}
@Provides
@Singleton
fun providesClearHotWalletContextualUnlockUseCase(
hotWalletAccessor: HotWalletAccessor,
): ClearHotWalletContextualUnlockUseCase {
return ClearHotWalletContextualUnlockUseCase(
hotWalletAccessor = hotWalletAccessor,
)
}
@Provides
@Singleton
fun providesExportSeedPhraseUseCase(hotWalletAccessor: HotWalletAccessor): ExportSeedPhraseUseCase {
return ExportSeedPhraseUseCase(
hotWalletAccessor = hotWalletAccessor,
)
}
}

View file

@ -32,6 +32,13 @@ class TangemHotSDKProxy @Inject constructor() : TangemHotSdk {
override suspend fun exportBackup(unlockHotWallet: UnlockHotWallet): ByteArray =
callSdk { exportBackup(unlockHotWallet) }
override suspend fun clearUnlockContext(hotWalletId: HotWalletId) {
callSdk { clearUnlockContext(hotWalletId) }
}
override suspend fun getContextUnlock(unlockHotWallet: UnlockHotWallet): UnlockHotWallet =
callSdk { getContextUnlock(unlockHotWallet) }
override suspend fun delete(id: HotWalletId) = callSdk { delete(id) }
override suspend fun changeAuth(unlockHotWallet: UnlockHotWallet, auth: HotAuth): HotWalletId =

View file

@ -23,6 +23,7 @@ import com.tangem.features.hotwallet.CreateWalletBackupComponent
import com.tangem.features.hotwallet.UpdateAccessCodeComponent
import com.tangem.features.hotwallet.HotWalletFeatureToggles
import com.tangem.features.hotwallet.WalletBackupComponent
import com.tangem.features.hotwallet.ViewPhraseComponent
import com.tangem.features.managetokens.component.ChooseManagedTokensComponent
import com.tangem.features.managetokens.component.ManageTokensComponent
import com.tangem.features.managetokens.component.ManageTokensSource
@ -109,6 +110,7 @@ internal class ChildFactory @Inject constructor(
private val walletActivationComponentFactory: WalletActivationComponent.Factory,
private val createWalletBackupComponentFactory: CreateWalletBackupComponent.Factory,
private val updateAccessCodeComponentFactory: UpdateAccessCodeComponent.Factory,
private val viewPhraseComponentFactory: ViewPhraseComponent.Factory,
private val sendWithSwapComponentFactory: SendWithSwapComponent.Factory,
private val sendEntryPointComponentFactory: SendEntryPointComponent.Factory,
private val tangemPayDetailsComponentFactory: TangemPayDetailsComponent.Factory,
@ -532,6 +534,15 @@ internal class ChildFactory @Inject constructor(
componentFactory = updateAccessCodeComponentFactory,
)
}
is AppRoute.ViewPhrase -> {
createComponentChild(
context = context,
params = ViewPhraseComponent.Params(
userWalletId = route.userWalletId,
),
componentFactory = viewPhraseComponentFactory,
)
}
is AppRoute.SendEntryPoint -> {
createComponentChild(
context = context,