Updated on 2026-08-14
This commit is contained in:
parent
ebcf2f40e5
commit
dca991651c
13 changed files with 173 additions and 15 deletions
41
app/src/main/java/com/tangem/tap/proxy/di/ProxyModule.kt
Normal file
41
app/src/main/java/com/tangem/tap/proxy/di/ProxyModule.kt
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
package com.tangem.tap.proxy.di
|
||||
|
||||
import com.tangem.blockchain.common.WalletManagerFactory
|
||||
import com.tangem.lib.crypto.DerivationManager
|
||||
import com.tangem.lib.crypto.UserWalletManager
|
||||
import com.tangem.tap.proxy.AppStateHolder
|
||||
import com.tangem.tap.proxy.DerivationManagerImpl
|
||||
import com.tangem.tap.proxy.UserWalletManagerImpl
|
||||
import dagger.Module
|
||||
import dagger.Provides
|
||||
import dagger.hilt.InstallIn
|
||||
import dagger.hilt.components.SingletonComponent
|
||||
import javax.inject.Singleton
|
||||
|
||||
@Module
|
||||
@InstallIn(SingletonComponent::class)
|
||||
class ProxyModule {
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
fun provideAppStateHolder(): AppStateHolder {
|
||||
return AppStateHolder()
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
fun provideUserWalletManager(appStateHolder: AppStateHolder): UserWalletManager {
|
||||
return UserWalletManagerImpl(
|
||||
appStateHolder = appStateHolder,
|
||||
walletManagerFactory = WalletManagerFactory(),
|
||||
)
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
fun provideDerivationManager(appStateHolder: AppStateHolder): DerivationManager {
|
||||
return DerivationManagerImpl(
|
||||
appStateHolder = appStateHolder,
|
||||
)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue