Updated on 2026-08-14
This commit is contained in:
commit
3946e4ebca
359 changed files with 8459 additions and 3324 deletions
|
|
@ -67,7 +67,11 @@ internal class DefaultTangemPayStorage @Inject constructor(
|
|||
secureStorage.get(createOrderIdKey(customerWalletAddress))?.decodeToString(throwOnInvalidSequence = true)
|
||||
}
|
||||
|
||||
override suspend fun clear(customerWalletAddress: String) = withContext(dispatcherProvider.io) {
|
||||
override suspend fun clearOrderId(customerWalletAddress: String) = withContext(dispatcherProvider.io) {
|
||||
secureStorage.delete(createOrderIdKey(customerWalletAddress))
|
||||
}
|
||||
|
||||
override suspend fun clearAll(customerWalletAddress: String) = withContext(dispatcherProvider.io) {
|
||||
secureStorage.delete(createKey(customerWalletAddress))
|
||||
secureStorage.delete(createOrderIdKey(customerWalletAddress))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,8 +49,12 @@ internal object AccountDomainModule {
|
|||
@Singleton
|
||||
fun provideRecoverCryptoPortfolioUseCase(
|
||||
accountsCRUDRepository: AccountsCRUDRepository,
|
||||
mainAccountTokensMigration: MainAccountTokensMigration,
|
||||
): RecoverCryptoPortfolioUseCase {
|
||||
return RecoverCryptoPortfolioUseCase(crudRepository = accountsCRUDRepository)
|
||||
return RecoverCryptoPortfolioUseCase(
|
||||
crudRepository = accountsCRUDRepository,
|
||||
mainAccountTokensMigration = mainAccountTokensMigration,
|
||||
)
|
||||
}
|
||||
|
||||
@Provides
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import com.tangem.domain.wallets.legacy.UserWalletsListManager
|
|||
import com.tangem.domain.wallets.repository.WalletNamesMigrationRepository
|
||||
import com.tangem.domain.wallets.repository.WalletsRepository
|
||||
import com.tangem.domain.wallets.usecase.*
|
||||
import com.tangem.domain.yield.supply.YieldSupplyMarketRepository
|
||||
import com.tangem.domain.yield.supply.YieldSupplyRepository
|
||||
import com.tangem.domain.yield.supply.usecase.YieldSupplyApyFlowUseCase
|
||||
import com.tangem.domain.yield.supply.usecase.YieldSupplyApyUpdateUseCase
|
||||
import com.tangem.feature.wallet.presentation.wallet.domain.IsWalletNFTEnabledSyncUseCase
|
||||
|
|
@ -454,21 +454,17 @@ internal object WalletsDomainModule {
|
|||
|
||||
@Provides
|
||||
@Singleton
|
||||
fun provideYieldSupplyApyFlowUseCase(
|
||||
yieldSupplyMarketRepository: YieldSupplyMarketRepository,
|
||||
): YieldSupplyApyFlowUseCase {
|
||||
fun provideYieldSupplyApyFlowUseCase(yieldSupplyRepository: YieldSupplyRepository): YieldSupplyApyFlowUseCase {
|
||||
return YieldSupplyApyFlowUseCase(
|
||||
yieldSupplyMarketRepository = yieldSupplyMarketRepository,
|
||||
yieldSupplyRepository = yieldSupplyRepository,
|
||||
)
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
fun provideYieldSupplyApyUpdateUseCase(
|
||||
yieldSupplyMarketRepository: YieldSupplyMarketRepository,
|
||||
): YieldSupplyApyUpdateUseCase {
|
||||
fun provideYieldSupplyApyUpdateUseCase(yieldSupplyRepository: YieldSupplyRepository): YieldSupplyApyUpdateUseCase {
|
||||
return YieldSupplyApyUpdateUseCase(
|
||||
yieldSupplyMarketRepository = yieldSupplyMarketRepository,
|
||||
yieldSupplyRepository = yieldSupplyRepository,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -4,7 +4,7 @@ import com.tangem.domain.blockaid.BlockAidGasEstimate
|
|||
import com.tangem.domain.transaction.FeeRepository
|
||||
import com.tangem.domain.transaction.error.FeeErrorResolver
|
||||
import com.tangem.domain.yield.supply.YieldSupplyErrorResolver
|
||||
import com.tangem.domain.yield.supply.YieldSupplyMarketRepository
|
||||
import com.tangem.domain.yield.supply.YieldSupplyRepository
|
||||
import com.tangem.domain.yield.supply.YieldSupplyTransactionRepository
|
||||
import com.tangem.domain.yield.supply.usecase.*
|
||||
import dagger.Module
|
||||
|
|
@ -82,30 +82,54 @@ internal object YieldSupplyDomainModule {
|
|||
@Provides
|
||||
@Singleton
|
||||
fun provideYieldSupplyGetTokenStatusUseCase(
|
||||
yieldSupplyMarketRepository: YieldSupplyMarketRepository,
|
||||
yieldSupplyRepository: YieldSupplyRepository,
|
||||
): YieldSupplyGetTokenStatusUseCase {
|
||||
return YieldSupplyGetTokenStatusUseCase(
|
||||
yieldSupplyMarketRepository = yieldSupplyMarketRepository,
|
||||
yieldSupplyRepository = yieldSupplyRepository,
|
||||
)
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
fun provideYieldSupplyGetApyUseCase(
|
||||
yieldSupplyMarketRepository: YieldSupplyMarketRepository,
|
||||
): YieldSupplyGetApyUseCase {
|
||||
fun provideYieldSupplyGetApyUseCase(yieldSupplyRepository: YieldSupplyRepository): YieldSupplyGetApyUseCase {
|
||||
return YieldSupplyGetApyUseCase(
|
||||
yieldSupplyMarketRepository = yieldSupplyMarketRepository,
|
||||
yieldSupplyRepository = yieldSupplyRepository,
|
||||
)
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
fun provideYieldSupplyGetChartUseCase(
|
||||
yieldSupplyMarketRepository: YieldSupplyMarketRepository,
|
||||
): YieldSupplyGetChartUseCase {
|
||||
fun provideYieldSupplyGetChartUseCase(yieldSupplyRepository: YieldSupplyRepository): YieldSupplyGetChartUseCase {
|
||||
return YieldSupplyGetChartUseCase(
|
||||
yieldSupplyMarketRepository = yieldSupplyMarketRepository,
|
||||
yieldSupplyRepository = yieldSupplyRepository,
|
||||
)
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
fun provideYieldSupplyIsAvailableUseCase(
|
||||
yieldSupplyRepository: YieldSupplyRepository,
|
||||
): YieldSupplyIsAvailableUseCase {
|
||||
return YieldSupplyIsAvailableUseCase(
|
||||
yieldSupplyRepository = yieldSupplyRepository,
|
||||
)
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
fun provideYieldSupplyActivateUseCase(yieldSupplyRepository: YieldSupplyRepository): YieldSupplyActivateUseCase {
|
||||
return YieldSupplyActivateUseCase(
|
||||
yieldSupplyRepository = yieldSupplyRepository,
|
||||
)
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
fun provideYieldSupplyDeactivateUseCase(
|
||||
yieldSupplyRepository: YieldSupplyRepository,
|
||||
): YieldSupplyDeactivateUseCase {
|
||||
return YieldSupplyDeactivateUseCase(
|
||||
yieldSupplyRepository = yieldSupplyRepository,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -160,4 +160,6 @@ internal val Blockchain.moonPaySupportedCurrency: MoonPaySupportedCurrency?
|
|||
Pepecoin, PepecoinTestnet -> null
|
||||
Hyperliquid, HyperliquidTestnet -> null
|
||||
Quai, QuaiTestnet -> null
|
||||
Linea, LineaTestnet -> null
|
||||
ArbitrumNova -> null
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@ package com.tangem.tap.routing.utils
|
|||
|
||||
import com.tangem.common.routing.AppRoute
|
||||
import com.tangem.core.decompose.context.AppComponentContext
|
||||
import com.tangem.domain.models.PortfolioId
|
||||
import com.tangem.domain.qrscanning.models.SourceType
|
||||
import com.tangem.feature.qrscanning.QrScanningComponent
|
||||
import com.tangem.feature.referral.api.ReferralComponent
|
||||
|
|
@ -12,6 +13,7 @@ import com.tangem.features.account.AccountCreateEditComponent
|
|||
import com.tangem.features.account.AccountDetailsComponent
|
||||
import com.tangem.features.account.ArchivedAccountListComponent
|
||||
import com.tangem.features.createwalletselection.CreateWalletSelectionComponent
|
||||
import com.tangem.features.createwalletstart.CreateWalletStartComponent
|
||||
import com.tangem.features.details.component.DetailsComponent
|
||||
import com.tangem.features.disclaimer.api.components.DisclaimerComponent
|
||||
import com.tangem.features.home.api.HomeComponent
|
||||
|
|
@ -19,6 +21,7 @@ import com.tangem.features.hotwallet.*
|
|||
import com.tangem.features.kyc.KycComponent
|
||||
import com.tangem.features.managetokens.component.ChooseManagedTokensComponent
|
||||
import com.tangem.features.managetokens.component.ManageTokensComponent
|
||||
import com.tangem.features.managetokens.component.ManageTokensMode
|
||||
import com.tangem.features.managetokens.component.ManageTokensSource
|
||||
import com.tangem.features.markets.details.MarketsTokenDetailsComponent
|
||||
import com.tangem.features.markets.tokenlist.MarketsTokenListComponent
|
||||
|
|
@ -97,6 +100,7 @@ internal class ChildFactory @Inject constructor(
|
|||
private val usedeskComponentFactory: UsedeskComponent.Factory,
|
||||
private val chooseManagedTokensComponentFactory: ChooseManagedTokensComponent.Factory,
|
||||
private val createWalletSelectionComponentFactory: CreateWalletSelectionComponent.Factory,
|
||||
private val createWalletStartComponentFactory: CreateWalletStartComponent.Factory,
|
||||
private val createMobileWalletComponentFactory: CreateMobileWalletComponent.Factory,
|
||||
private val upgradeWalletComponentFactory: UpgradeWalletComponent.Factory,
|
||||
private val addExistingWalletComponentFactory: AddExistingWalletComponent.Factory,
|
||||
|
|
@ -140,9 +144,15 @@ internal class ChildFactory @Inject constructor(
|
|||
AppRoute.ManageTokens.Source.STORIES -> ManageTokensSource.STORIES
|
||||
}
|
||||
|
||||
val mode = when (val portfolio = route.portfolioId) {
|
||||
is PortfolioId.Account -> ManageTokensMode.Account(portfolio.accountId)
|
||||
is PortfolioId.Wallet -> ManageTokensMode.Wallet(portfolio.userWalletId)
|
||||
null -> ManageTokensMode.None
|
||||
}
|
||||
|
||||
createComponentChild(
|
||||
context = context,
|
||||
params = ManageTokensComponent.Params(route.userWalletId, source),
|
||||
params = ManageTokensComponent.Params(mode, source),
|
||||
componentFactory = manageTokensComponentFactory,
|
||||
)
|
||||
}
|
||||
|
|
@ -200,7 +210,7 @@ internal class ChildFactory @Inject constructor(
|
|||
createComponentChild(
|
||||
context = context,
|
||||
params = OnrampComponent.Params(
|
||||
userWalletId = route.portfolioId.userWalletId, // todo account portfolioId param,
|
||||
userWalletId = route.userWalletId,
|
||||
cryptoCurrency = route.currency,
|
||||
source = route.source,
|
||||
shouldLaunchSepa = route.shouldLaunchSepa,
|
||||
|
|
@ -274,7 +284,7 @@ internal class ChildFactory @Inject constructor(
|
|||
createComponentChild(
|
||||
context = context,
|
||||
params = TokenDetailsComponent.Params(
|
||||
userWalletId = route.portfolioId.userWalletId, // todo account portfolioId param
|
||||
userWalletId = route.userWalletId,
|
||||
currency = route.currency,
|
||||
),
|
||||
componentFactory = tokenDetailsComponentFactory,
|
||||
|
|
@ -284,7 +294,7 @@ internal class ChildFactory @Inject constructor(
|
|||
createComponentChild(
|
||||
context = context,
|
||||
params = StakingComponent.Params(
|
||||
userWalletId = route.portfolioId.userWalletId, // todo account portfolioId param,
|
||||
userWalletId = route.userWalletId,
|
||||
cryptoCurrencyId = route.cryptoCurrencyId,
|
||||
yieldId = route.yieldId,
|
||||
),
|
||||
|
|
@ -297,7 +307,7 @@ internal class ChildFactory @Inject constructor(
|
|||
params = SwapComponent.Params(
|
||||
currencyFrom = route.currencyFrom,
|
||||
currencyTo = route.currencyTo,
|
||||
userWalletId = route.portfolioId.userWalletId, // todo account portfolioId param,
|
||||
userWalletId = route.userWalletId,
|
||||
isInitialReverseOrder = route.isInitialReverseOrder,
|
||||
screenSource = route.screenSource,
|
||||
),
|
||||
|
|
@ -308,7 +318,7 @@ internal class ChildFactory @Inject constructor(
|
|||
createComponentChild(
|
||||
context = context,
|
||||
params = SendComponent.Params(
|
||||
userWalletId = route.portfolioId.userWalletId, // todo account portfolioId param,
|
||||
userWalletId = route.userWalletId,
|
||||
currency = route.currency,
|
||||
transactionId = route.transactionId,
|
||||
amount = route.amount,
|
||||
|
|
@ -468,6 +478,19 @@ internal class ChildFactory @Inject constructor(
|
|||
componentFactory = chooseManagedTokensComponentFactory,
|
||||
)
|
||||
}
|
||||
is AppRoute.CreateWalletStart -> {
|
||||
val mode = when (route.mode) {
|
||||
AppRoute.CreateWalletStart.Mode.ColdWallet -> CreateWalletStartComponent.Mode.ColdWallet
|
||||
AppRoute.CreateWalletStart.Mode.HotWallet -> CreateWalletStartComponent.Mode.HotWallet
|
||||
}
|
||||
createComponentChild(
|
||||
context = context,
|
||||
params = CreateWalletStartComponent.Params(
|
||||
mode = mode,
|
||||
),
|
||||
componentFactory = createWalletStartComponentFactory,
|
||||
)
|
||||
}
|
||||
is AppRoute.CreateWalletSelection -> {
|
||||
createComponentChild(
|
||||
context = context,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue