Updated on 2026-08-14
This commit is contained in:
parent
59edfa2d94
commit
cb673c9ac6
11 changed files with 32 additions and 37 deletions
|
|
@ -3,7 +3,6 @@ package com.tangem.tap.proxy
|
|||
import com.tangem.core.navigation.AppScreen
|
||||
import com.tangem.core.navigation.NavigationAction
|
||||
import com.tangem.core.navigation.ReduxNavController
|
||||
import com.tangem.domain.appcurrency.model.AppCurrency
|
||||
import com.tangem.domain.models.scan.CardDTO
|
||||
import com.tangem.domain.models.scan.ScanResponse
|
||||
import com.tangem.domain.redux.ReduxStateHolder
|
||||
|
|
@ -43,7 +42,6 @@ class AppStateHolder @Inject constructor() : WalletsStateHolder, ReduxNavControl
|
|||
var scanResponse: ScanResponse? = null
|
||||
var mainStore: Store<AppState>? = null
|
||||
var tangemSdkManager: TangemSdkManager? = null
|
||||
var appFiatCurrency: AppCurrency = AppCurrency.Default
|
||||
var exchangeService: ExchangeService? = null
|
||||
|
||||
fun getActualCard(): CardDTO? {
|
||||
|
|
|
|||
|
|
@ -16,13 +16,11 @@ import com.tangem.lib.crypto.models.Currency
|
|||
import com.tangem.lib.crypto.models.Currency.NativeToken
|
||||
import com.tangem.lib.crypto.models.Currency.NonNativeToken
|
||||
import com.tangem.lib.crypto.models.ProxyAmount
|
||||
import com.tangem.lib.crypto.models.ProxyFiatCurrency
|
||||
import com.tangem.tap.userWalletsListManager
|
||||
import timber.log.Timber
|
||||
import java.math.BigDecimal
|
||||
|
||||
class UserWalletManagerImpl(
|
||||
private val appStateHolder: AppStateHolder,
|
||||
private val walletManagersFacade: WalletManagersFacade,
|
||||
private val currenciesRepository: CurrenciesRepository,
|
||||
private val userWalletsStore: UserWalletsStore,
|
||||
|
|
@ -171,15 +169,6 @@ class UserWalletManagerImpl(
|
|||
return blockchain.currency
|
||||
}
|
||||
|
||||
override fun getUserAppCurrency(): ProxyFiatCurrency {
|
||||
val appCurrency = appStateHolder.appFiatCurrency
|
||||
return ProxyFiatCurrency(
|
||||
code = appCurrency.code,
|
||||
name = appCurrency.name,
|
||||
symbol = appCurrency.symbol,
|
||||
)
|
||||
}
|
||||
|
||||
@Throws(IllegalArgumentException::class)
|
||||
private suspend fun getActualWalletManager(blockchain: Blockchain, derivationPath: String?): WalletManager {
|
||||
val selectedUserWallet = requireNotNull(
|
||||
|
|
|
|||
|
|
@ -30,13 +30,11 @@ internal object ProxyModule {
|
|||
@Provides
|
||||
@Singleton
|
||||
fun provideUserWalletManager(
|
||||
appStateHolder: AppStateHolder,
|
||||
walletManagersFacade: WalletManagersFacade,
|
||||
currenciesRepository: CurrenciesRepository,
|
||||
userWalletsStore: UserWalletsStore,
|
||||
): UserWalletManager {
|
||||
return UserWalletManagerImpl(
|
||||
appStateHolder = appStateHolder,
|
||||
walletManagersFacade = walletManagersFacade,
|
||||
currenciesRepository = currenciesRepository,
|
||||
userWalletsStore = userWalletsStore,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue