Updated on 2026-08-14
This commit is contained in:
parent
ce948a71ae
commit
ad9def0d21
27 changed files with 6 additions and 291 deletions
|
|
@ -22,7 +22,6 @@ import com.tangem.features.promobanners.api.PromoBannersBlockComponent
|
|||
import kotlinx.serialization.Serializable
|
||||
import javax.inject.Inject
|
||||
|
||||
@Suppress("LongParameterList")
|
||||
internal class FeedEntryChildFactory @Inject constructor(
|
||||
private val analyticsEventHandler: AnalyticsEventHandler,
|
||||
private val portfolioComponentFactory: MarketsPortfolioComponent.Factory,
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ interface OnrampComponent : ComposableContentComponent {
|
|||
val userWalletId: UserWalletId,
|
||||
val cryptoCurrency: CryptoCurrency,
|
||||
val source: OnrampSource,
|
||||
val shouldLaunchSepa: Boolean = false,
|
||||
)
|
||||
|
||||
interface Factory : ComponentFactory<Params, OnrampComponent>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ internal interface ConfirmResidencyComponent : ComposableBottomSheetComponent {
|
|||
val userWalletId: UserWalletId,
|
||||
val cryptoCurrency: CryptoCurrency,
|
||||
val country: OnrampCountry,
|
||||
val isLaunchSepa: Boolean,
|
||||
val onDismiss: () -> Unit,
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -9,14 +9,12 @@ import com.tangem.core.decompose.model.ParamsContainer
|
|||
import com.tangem.core.decompose.navigation.Router
|
||||
import com.tangem.core.ui.extensions.resourceReference
|
||||
import com.tangem.domain.onramp.OnrampSaveDefaultCountryUseCase
|
||||
import com.tangem.domain.onramp.OnrampSaveDefaultCurrencyUseCase
|
||||
import com.tangem.domain.onramp.analytics.OnrampAnalyticsEvent
|
||||
import com.tangem.domain.onramp.model.OnrampCountry
|
||||
import com.tangem.features.onramp.confirmresidency.ConfirmResidencyComponent
|
||||
import com.tangem.features.onramp.confirmresidency.entity.ConfirmResidencyBottomSheetConfig
|
||||
import com.tangem.features.onramp.confirmresidency.entity.ConfirmResidencyUM
|
||||
import com.tangem.features.onramp.impl.R
|
||||
import com.tangem.features.onramp.utils.model.EUR_CURRENCY
|
||||
import com.tangem.utils.coroutines.CoroutineDispatcherProvider
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.launch
|
||||
|
|
@ -28,7 +26,6 @@ internal class ConfirmResidencyModel @Inject constructor(
|
|||
private val analyticsEventHandler: AnalyticsEventHandler,
|
||||
private val router: Router,
|
||||
private val saveDefaultCountryUseCase: OnrampSaveDefaultCountryUseCase,
|
||||
private val onrampSaveDefaultCurrencyUseCase: OnrampSaveDefaultCurrencyUseCase,
|
||||
paramsContainer: ParamsContainer,
|
||||
) : Model() {
|
||||
|
||||
|
|
@ -57,10 +54,6 @@ internal class ConfirmResidencyModel @Inject constructor(
|
|||
analyticsEventHandler.send(OnrampAnalyticsEvent.OnResidenceConfirm(country.name))
|
||||
modelScope.launch {
|
||||
saveDefaultCountryUseCase.invoke(country)
|
||||
if (params.isLaunchSepa) {
|
||||
onrampSaveDefaultCurrencyUseCase.invoke(EUR_CURRENCY)
|
||||
}
|
||||
|
||||
params.onDismiss()
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -63,7 +63,6 @@ internal class DefaultOnrampMainComponent @AssistedInject constructor(
|
|||
userWalletId = params.userWalletId,
|
||||
cryptoCurrency = params.cryptoCurrency,
|
||||
country = config.country,
|
||||
isLaunchSepa = false,
|
||||
onDismiss = {
|
||||
model.bottomSheetNavigation.dismiss()
|
||||
model.handleOnrampAvailable()
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
package com.tangem.features.onramp.utils.model
|
||||
|
||||
import com.tangem.domain.onramp.model.OnrampCurrency
|
||||
|
||||
internal val EUR_CURRENCY = OnrampCurrency(
|
||||
code = "EUR",
|
||||
name = "Euro",
|
||||
unit = "€",
|
||||
precision = 2,
|
||||
image = "https://s3.eu-central-1.amazonaws.com/tangem.api/express/Currencies/EUR.png",
|
||||
)
|
||||
|
|
@ -26,7 +26,6 @@ dependencies {
|
|||
implementation(projects.core.analytics.models)
|
||||
implementation(projects.core.utils)
|
||||
implementation(projects.core.datasource)
|
||||
implementation(projects.core.configToggles)
|
||||
|
||||
/** Compose */
|
||||
implementation(deps.compose.foundation)
|
||||
|
|
|
|||
|
|
@ -61,7 +61,6 @@ internal class TokenDetailsNotificationsAnalyticsSender(
|
|||
is TokenDetailsNotification.MigrationClore,
|
||||
is TokenDetailsNotification.UsedOutdatedData,
|
||||
-> null
|
||||
is TokenDetailsNotification.DynamicAddressesFundsFound -> null // TODO: [REDACTED_TASK_KEY] analytics event
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -149,9 +149,6 @@ internal class GetMultiWalletWarningsFactory @Inject constructor(
|
|||
!notificationsRepository.isUserAllowToSubscribeOnPushNotifications(),
|
||||
)
|
||||
|
||||
// Remove in first iteration of yield supply feature
|
||||
// addYieldSupplyNotifications(flattenCurrencies)
|
||||
|
||||
val hasCriticalOrWarning = any { notification ->
|
||||
notification is WalletNotification.Critical || notification is WalletNotification.Warning
|
||||
}
|
||||
|
|
@ -283,15 +280,6 @@ internal class GetMultiWalletWarningsFactory @Inject constructor(
|
|||
.map(CryptoCurrencyStatus::currency)
|
||||
}
|
||||
|
||||
// private fun MutableList<WalletNotification>.addYieldSupplyNotifications(
|
||||
// flattenCurrencies: Lce<TokenListError, List<CryptoCurrencyStatus>>,
|
||||
// ) {
|
||||
// addIf(
|
||||
// element = WalletNotification.Warning.YeildSupplyApprove,
|
||||
// condition = flattenCurrencies.hasTokensWithActivatedSupplyWithoutApprove(),
|
||||
// )
|
||||
// }
|
||||
|
||||
private fun MutableList<WalletNotification>.addWarningNotifications(
|
||||
cardTypesResolver: CardTypesResolver?,
|
||||
flattenCurrencies: List<CryptoCurrencyStatus>,
|
||||
|
|
@ -354,15 +342,6 @@ internal class GetMultiWalletWarningsFactory @Inject constructor(
|
|||
return this.any { it.value is CryptoCurrencyStatus.Unreachable }
|
||||
}
|
||||
|
||||
// Remove in first iteration of yield supply feature
|
||||
// private fun Lce<TokenListError, List<CryptoCurrencyStatus>>.hasTokensWithActivatedSupplyWithoutApprove(): Boolean {
|
||||
// val flattenCurrencies = getOrNull(isPartialContentAccepted = false) ?: return false
|
||||
// val yieldSupplyEnabled = yieldSupplyFeatureToggles.isYieldSupplyFeatureEnabled
|
||||
// return yieldSupplyEnabled && flattenCurrencies.any {
|
||||
// it.value.yieldSupplyStatus?.isAllowedToSpend == false
|
||||
// }
|
||||
// }
|
||||
|
||||
private fun MutableList<WalletNotification>.addAssetsDiscoveryCompletedNotification(
|
||||
userWallet: UserWallet,
|
||||
assetsDiscoveryProgress: AssetsDiscoveryProgress,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue