From ad9def0d21d644592bfdf32abd54007d0c961605 Mon Sep 17 00:00:00 2001 From: Tangem Date: Thu, 14 May 2026 12:37:27 +0300 Subject: [PATCH] Updated on 2026-08-14 --- .../tap/di/domain/OnrampDomainModule.kt | 6 -- .../tangem/tap/routing/utils/ChildFactory.kt | 1 - .../com/tangem/common/routing/AppRoute.kt | 1 - .../tangem/datasource/di/OnrampStoreModule.kt | 12 +-- .../DefaultOnrampCurrentCountryByIPStore.kt | 2 +- .../OnrampCurrentCountryByIPStore.kt | 2 +- .../DefaultOnrampSepaAvailabilityStore.kt | 20 ----- .../sepa/OnrampSepaAvailabilityStore.kt | 10 --- .../sepa/OnrampSepaAvailabilityStoreKey.kt | 11 --- .../local/preferences/PreferencesDataStore.kt | 6 -- .../local/preferences/PreferencesKeys.kt | 13 --- .../components/notifications/Notification.kt | 11 --- .../core/ui/ds/message/TangemMessage.kt | 10 --- .../res/drawable/img_notification_sepa.webp | Bin 16250 -> 0 bytes .../data/onramp/DefaultOnrampRepository.kt | 64 +-------------- .../tangem/data/onramp/di/OnrampDataModule.kt | 5 +- .../onramp/OnrampSepaAvailableUseCase.kt | 77 ------------------ .../onramp/repositories/OnrampRepository.kt | 1 - .../feed/components/FeedEntryChildFactory.kt | 1 - .../onramp/component/OnrampComponent.kt | 1 - .../ConfirmResidencyComponent.kt | 1 - .../model/ConfirmResidencyModel.kt | 7 -- .../onramp/main/DefaultOnrampMainComponent.kt | 1 - .../onramp/utils/model/EurCurrency.kt | 11 --- features/promo-banners/impl/build.gradle.kts | 1 - ...okenDetailsNotificationsAnalyticsSender.kt | 1 - .../domain/GetMultiWalletWarningsFactory.kt | 21 ----- 27 files changed, 6 insertions(+), 291 deletions(-) rename core/datasource/src/main/java/com/tangem/datasource/local/onramp/{sepa => country}/DefaultOnrampCurrentCountryByIPStore.kt (93%) rename core/datasource/src/main/java/com/tangem/datasource/local/onramp/{sepa => country}/OnrampCurrentCountryByIPStore.kt (80%) delete mode 100644 core/datasource/src/main/java/com/tangem/datasource/local/onramp/sepa/DefaultOnrampSepaAvailabilityStore.kt delete mode 100644 core/datasource/src/main/java/com/tangem/datasource/local/onramp/sepa/OnrampSepaAvailabilityStore.kt delete mode 100644 core/datasource/src/main/java/com/tangem/datasource/local/onramp/sepa/OnrampSepaAvailabilityStoreKey.kt delete mode 100644 core/ui/src/main/res/drawable/img_notification_sepa.webp delete mode 100644 domain/onramp/src/main/java/com/tangem/domain/onramp/OnrampSepaAvailableUseCase.kt delete mode 100644 features/onramp/impl/src/main/kotlin/com/tangem/features/onramp/utils/model/EurCurrency.kt diff --git a/app/src/main/java/com/tangem/tap/di/domain/OnrampDomainModule.kt b/app/src/main/java/com/tangem/tap/di/domain/OnrampDomainModule.kt index a365d68514..c372bdbd2b 100644 --- a/app/src/main/java/com/tangem/tap/di/domain/OnrampDomainModule.kt +++ b/app/src/main/java/com/tangem/tap/di/domain/OnrampDomainModule.kt @@ -129,12 +129,6 @@ internal object OnrampDomainModule { return OnrampSaveTransactionUseCase(onrampTransactionRepository, onrampErrorResolver) } - @Provides - @Singleton - fun provideOnrampSepaAvailableUseCase(onrampRepository: OnrampRepository): OnrampSepaAvailableUseCase { - return OnrampSepaAvailableUseCase(onrampRepository) - } - @Provides @Singleton fun provideOnrampUpdateTransactionStatusUseCase( diff --git a/app/src/main/java/com/tangem/tap/routing/utils/ChildFactory.kt b/app/src/main/java/com/tangem/tap/routing/utils/ChildFactory.kt index b8dd701b27..d9fc9e5fec 100644 --- a/app/src/main/java/com/tangem/tap/routing/utils/ChildFactory.kt +++ b/app/src/main/java/com/tangem/tap/routing/utils/ChildFactory.kt @@ -209,7 +209,6 @@ internal class ChildFactory @Inject constructor( userWalletId = route.userWalletId, cryptoCurrency = route.currency, source = route.source, - shouldLaunchSepa = route.shouldLaunchSepa, ), componentFactory = onrampComponentFactory, ) diff --git a/common/routing/src/main/kotlin/com/tangem/common/routing/AppRoute.kt b/common/routing/src/main/kotlin/com/tangem/common/routing/AppRoute.kt index d4df954b65..acb5a42b6b 100644 --- a/common/routing/src/main/kotlin/com/tangem/common/routing/AppRoute.kt +++ b/common/routing/src/main/kotlin/com/tangem/common/routing/AppRoute.kt @@ -290,7 +290,6 @@ sealed class AppRoute(val path: String) : Route { val source: OnrampSource, val userWalletId: UserWalletId, val currency: CryptoCurrency, - val shouldLaunchSepa: Boolean = false, ) : AppRoute(path = "/onramp/${userWalletId.stringValue}/${currency.symbol}"), RouteBundleParams { override fun getBundle(): Bundle = bundle(serializer()) } diff --git a/core/datasource/src/main/java/com/tangem/datasource/di/OnrampStoreModule.kt b/core/datasource/src/main/java/com/tangem/datasource/di/OnrampStoreModule.kt index 6d392c4e90..637184590d 100644 --- a/core/datasource/src/main/java/com/tangem/datasource/di/OnrampStoreModule.kt +++ b/core/datasource/src/main/java/com/tangem/datasource/di/OnrampStoreModule.kt @@ -11,10 +11,8 @@ import com.tangem.datasource.local.onramp.paymentmethods.DefaultOnrampPaymentMet import com.tangem.datasource.local.onramp.paymentmethods.OnrampPaymentMethodsStore import com.tangem.datasource.local.onramp.quotes.DefaultOnrampQuotesStore import com.tangem.datasource.local.onramp.quotes.OnrampQuotesStore -import com.tangem.datasource.local.onramp.sepa.DefaultOnrampCurrentCountryByIPStore -import com.tangem.datasource.local.onramp.sepa.DefaultOnrampSepaAvailabilityStore -import com.tangem.datasource.local.onramp.sepa.OnrampCurrentCountryByIPStore -import com.tangem.datasource.local.onramp.sepa.OnrampSepaAvailabilityStore +import com.tangem.datasource.local.onramp.country.DefaultOnrampCurrentCountryByIPStore +import com.tangem.datasource.local.onramp.country.OnrampCurrentCountryByIPStore import dagger.Module import dagger.Provides import dagger.hilt.InstallIn @@ -55,12 +53,6 @@ internal object OnrampStoreModule { return DefaultOnrampCurrenciesStore(dataStore = RuntimeDataStore()) } - @Provides - @Singleton - fun provideOnrampSepaAvailableStore(): OnrampSepaAvailabilityStore { - return DefaultOnrampSepaAvailabilityStore(dataStore = RuntimeDataStore()) - } - @Provides @Singleton fun provideOnrampCurrentCountryByIPStore(): OnrampCurrentCountryByIPStore { diff --git a/core/datasource/src/main/java/com/tangem/datasource/local/onramp/sepa/DefaultOnrampCurrentCountryByIPStore.kt b/core/datasource/src/main/java/com/tangem/datasource/local/onramp/country/DefaultOnrampCurrentCountryByIPStore.kt similarity index 93% rename from core/datasource/src/main/java/com/tangem/datasource/local/onramp/sepa/DefaultOnrampCurrentCountryByIPStore.kt rename to core/datasource/src/main/java/com/tangem/datasource/local/onramp/country/DefaultOnrampCurrentCountryByIPStore.kt index a2530e4208..be95955d99 100644 --- a/core/datasource/src/main/java/com/tangem/datasource/local/onramp/sepa/DefaultOnrampCurrentCountryByIPStore.kt +++ b/core/datasource/src/main/java/com/tangem/datasource/local/onramp/country/DefaultOnrampCurrentCountryByIPStore.kt @@ -1,4 +1,4 @@ -package com.tangem.datasource.local.onramp.sepa +package com.tangem.datasource.local.onramp.country import com.tangem.datasource.local.datastore.core.StringKeyDataStore import com.tangem.datasource.local.datastore.core.StringKeyDataStoreDecorator diff --git a/core/datasource/src/main/java/com/tangem/datasource/local/onramp/sepa/OnrampCurrentCountryByIPStore.kt b/core/datasource/src/main/java/com/tangem/datasource/local/onramp/country/OnrampCurrentCountryByIPStore.kt similarity index 80% rename from core/datasource/src/main/java/com/tangem/datasource/local/onramp/sepa/OnrampCurrentCountryByIPStore.kt rename to core/datasource/src/main/java/com/tangem/datasource/local/onramp/country/OnrampCurrentCountryByIPStore.kt index cf05f2046d..73d9e2178c 100644 --- a/core/datasource/src/main/java/com/tangem/datasource/local/onramp/sepa/OnrampCurrentCountryByIPStore.kt +++ b/core/datasource/src/main/java/com/tangem/datasource/local/onramp/country/OnrampCurrentCountryByIPStore.kt @@ -1,4 +1,4 @@ -package com.tangem.datasource.local.onramp.sepa +package com.tangem.datasource.local.onramp.country import com.tangem.domain.onramp.model.OnrampCountry diff --git a/core/datasource/src/main/java/com/tangem/datasource/local/onramp/sepa/DefaultOnrampSepaAvailabilityStore.kt b/core/datasource/src/main/java/com/tangem/datasource/local/onramp/sepa/DefaultOnrampSepaAvailabilityStore.kt deleted file mode 100644 index 9e8c14dff4..0000000000 --- a/core/datasource/src/main/java/com/tangem/datasource/local/onramp/sepa/DefaultOnrampSepaAvailabilityStore.kt +++ /dev/null @@ -1,20 +0,0 @@ -package com.tangem.datasource.local.onramp.sepa - -import com.tangem.datasource.local.datastore.core.StringKeyDataStore -import com.tangem.datasource.local.datastore.core.StringKeyDataStoreDecorator - -internal class DefaultOnrampSepaAvailabilityStore( - val dataStore: StringKeyDataStore, -) : OnrampSepaAvailabilityStore, StringKeyDataStoreDecorator( - wrappedDataStore = dataStore, -) { - override fun provideStringKey(key: OnrampSepaAvailabilityStoreKey) = with(key) { - buildString { - append(userWallet.walletId.toString()) - append("_") - append(country.code) - append("_") - append(cryptoCurrency.id.value) - } - } -} \ No newline at end of file diff --git a/core/datasource/src/main/java/com/tangem/datasource/local/onramp/sepa/OnrampSepaAvailabilityStore.kt b/core/datasource/src/main/java/com/tangem/datasource/local/onramp/sepa/OnrampSepaAvailabilityStore.kt deleted file mode 100644 index 6ae1bd2af0..0000000000 --- a/core/datasource/src/main/java/com/tangem/datasource/local/onramp/sepa/OnrampSepaAvailabilityStore.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.tangem.datasource.local.onramp.sepa - -import kotlinx.coroutines.flow.Flow - -interface OnrampSepaAvailabilityStore { - suspend fun getSyncOrNull(key: OnrampSepaAvailabilityStoreKey): Boolean? - fun get(key: OnrampSepaAvailabilityStoreKey): Flow - suspend fun store(key: OnrampSepaAvailabilityStoreKey, value: Boolean) - suspend fun clear() -} \ No newline at end of file diff --git a/core/datasource/src/main/java/com/tangem/datasource/local/onramp/sepa/OnrampSepaAvailabilityStoreKey.kt b/core/datasource/src/main/java/com/tangem/datasource/local/onramp/sepa/OnrampSepaAvailabilityStoreKey.kt deleted file mode 100644 index 301c4e83ef..0000000000 --- a/core/datasource/src/main/java/com/tangem/datasource/local/onramp/sepa/OnrampSepaAvailabilityStoreKey.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.tangem.datasource.local.onramp.sepa - -import com.tangem.domain.models.currency.CryptoCurrency -import com.tangem.domain.models.wallet.UserWallet -import com.tangem.domain.onramp.model.OnrampCountry - -data class OnrampSepaAvailabilityStoreKey( - val userWallet: UserWallet, - val country: OnrampCountry, - val cryptoCurrency: CryptoCurrency, -) \ No newline at end of file diff --git a/core/datasource/src/main/java/com/tangem/datasource/local/preferences/PreferencesDataStore.kt b/core/datasource/src/main/java/com/tangem/datasource/local/preferences/PreferencesDataStore.kt index 49fc4000a4..ffafe8a1a7 100644 --- a/core/datasource/src/main/java/com/tangem/datasource/local/preferences/PreferencesDataStore.kt +++ b/core/datasource/src/main/java/com/tangem/datasource/local/preferences/PreferencesDataStore.kt @@ -11,9 +11,6 @@ import androidx.datastore.preferences.core.emptyPreferences import androidx.datastore.preferences.preferencesDataStoreFile import com.tangem.datasource.local.preferences.PreferencesDataStore.INSTANCE import com.tangem.datasource.local.preferences.PreferencesKeys.APP_LOGS_KEY -import com.tangem.datasource.local.preferences.PreferencesKeys.IS_TOKEN_SWAP_PROMO_OKX_SHOW_KEY -import com.tangem.datasource.local.preferences.PreferencesKeys.IS_WALLET_SWAP_PROMO_OKX_SHOW_KEY -import com.tangem.datasource.local.preferences.PreferencesKeys.SHOULD_SHOW_RING_PROMO_KEY import com.tangem.datasource.local.preferences.utils.CleanupKeyMigration import com.tangem.datasource.local.preferences.utils.SharedPreferencesKeyMigration import com.tangem.datasource.local.preferences.utils.SwapCurrencyIdMigration @@ -83,9 +80,6 @@ internal object PreferencesDataStore { ), SwapCurrencyIdMigration(), CleanupKeyMigration(key = APP_LOGS_KEY), - CleanupKeyMigration(key = IS_WALLET_SWAP_PROMO_OKX_SHOW_KEY), - CleanupKeyMigration(key = IS_TOKEN_SWAP_PROMO_OKX_SHOW_KEY), - CleanupKeyMigration(key = SHOULD_SHOW_RING_PROMO_KEY), ) } } \ No newline at end of file diff --git a/core/datasource/src/main/java/com/tangem/datasource/local/preferences/PreferencesKeys.kt b/core/datasource/src/main/java/com/tangem/datasource/local/preferences/PreferencesKeys.kt index d12ab69628..544f799474 100644 --- a/core/datasource/src/main/java/com/tangem/datasource/local/preferences/PreferencesKeys.kt +++ b/core/datasource/src/main/java/com/tangem/datasource/local/preferences/PreferencesKeys.kt @@ -87,23 +87,10 @@ object PreferencesKeys { val UNSUBMITTED_TRANSACTIONS_KEY by lazy { stringPreferencesKey(name = "unsubmittedTransactions") } - @Deprecated("Remove after CleanupKeyMigration") - val IS_WALLET_SWAP_PROMO_OKX_SHOW_KEY by lazy { - booleanPreferencesKey(name = "isWalletSwapPromoOkxShown") - } - - @Deprecated("Remove after CleanupKeyMigration") - val IS_TOKEN_SWAP_PROMO_OKX_SHOW_KEY by lazy { - booleanPreferencesKey(name = "isTokenSwapPromoOkxShown") - } - val apiConfigsEnvironmentKey by lazy { stringPreferencesKey(name = "apiConfigsEnvironment") } val ADDED_WALLETS_WITH_RING_KEY by lazy { stringSetPreferencesKey(name = "addedWalletsWithRing") } - @Deprecated("Remove after CleanupKeyMigration") - val SHOULD_SHOW_RING_PROMO_KEY by lazy { booleanPreferencesKey(name = "shouldShowRingPromo") } - val ONRAMP_DEFAULT_COUNTRY by lazy { stringPreferencesKey(name = "onrampDefaultCountry") } val ONRAMP_TRANSACTIONS_STATUSES_KEY by lazy { stringPreferencesKey(name = "onrampTransactionsStatuses") } diff --git a/core/ui/src/main/java/com/tangem/core/ui/components/notifications/Notification.kt b/core/ui/src/main/java/com/tangem/core/ui/components/notifications/Notification.kt index bd01f82aaa..8123702885 100644 --- a/core/ui/src/main/java/com/tangem/core/ui/components/notifications/Notification.kt +++ b/core/ui/src/main/java/com/tangem/core/ui/components/notifications/Notification.kt @@ -28,7 +28,6 @@ import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.tooling.preview.datasource.CollectionPreviewParameterProvider import androidx.compose.ui.unit.Dp -import androidx.compose.ui.unit.dp import com.tangem.core.ui.R import com.tangem.core.ui.components.* import com.tangem.core.ui.components.buttons.common.TangemButtonSize @@ -520,15 +519,5 @@ private class NotificationConfigProvider : CollectionPreviewParameterProvider00HoTZJQy< z+P0k$nORlcJ+^Ig*|s;^w{6?L?`7MzZQHiGmu7lqG9#{S%gVeWGBYx6-*-enlq9Kc zvwH`}(7Ad`@7<30VdP7nlsbf@PkQBGL8D9^MYeXhBm^ zeb(Lq#@Pe6-TVqc&dN`Ci2>_>;m@a? zcIvt3pMU;&mtB7O<(FQU^4eQ(NqKjh4?Xa}gAYCN_@lR-a_CHfpphwJ?#fOlq?p#L zQ!PbQ?|el0+^7*?&C8cjxqNs>gv~I@8*WR8!zrQCn9$j1=BxGoJc1jhHD;{P;!Kya1-_fr8k;wX23N-&2(f#r zb?4lsp^hU}!Zkgh>RnhxRU;TgF?oP%G+A*2Aync6RgZ{9gX_=*2t1IGAJ``wxs#M% zAWu;5)5t{51i^4pzQE0yWL9!5Q6VI{eW64jqmd>}6)S}Jy+4$w)y!9R0CE`l1S8rN z(_#Zq4Fq2CiPD^A!>VyL2zDl~aA~9I3M5E*1q*X!9 zveMvE&%_Cu=B`i;f_~%~z5r(umw6`Ee~wyiG?Pv84QF*Y0`V8m#A-QOO(!5g+B5ih zqs3LJa{VUvB+ryn*vSW?!o;h-N&l_UE@?!3N2mf~oM+;g(A8>X(v@eQs6CUnW~+m( zSt(+_K%E?Pwvml14a8i}dqrPEzYaDXREiZoX`voQ|5Ve~W}tkC ziC+1kBhjyuiBrgSTv_l#f8^>F3&TDgnYbC{(v{+AU)+8*{S;kYot<`h*{sqNzIa&n zd@XGD?QEB3^6Va(Wn+p5uxj~(-y4OFzFmy+dDYe7sb$nE6FZR~qF&@J z8wILazx{$d!CjgrmC~+uskoLrk$eR?tDp-1uHK0HWGsuXR8d{_JKn(7VVG&f{A%Uj z7591rCyFrhYXwS6Uk)VRz~ji}J^ospD(a;Db@V^;A~3QEZ{*u zY^ywKmqx|>njhlL1)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oR|)j3u|4@27*|Uli$E)5Fqsqao_?7LLF|eN^9< z@p!=LdLlH>d3)v}6eSNpdFwz77x0&+!-WjsM$-PPPwBe!Yef*8wpI>aZcS``V{LIt zdn!CcLK6q%pG=%fUP%;~aNBD5Q*2T+x}Ne*fF(w;Ja>~ji?l~3?TG;Xs6YLn%RTq! zBA^U3bgMvLe8qa-gKc%>qv*nQt>wB^qtCh5U~K?w#V6PO%;Vvlvu_6Z+A;d01#5Q) zI04205%q(C@A9?&z8hcUqie9zaHFQ_N!&5Q=dsk05#~skeB$;Zbe+?wJzLVoW+W9W k1o|G&-T*u-)&IBW6mq4pw*%PVrJy@PJjg6EPB4G~00WToivR!s diff --git a/data/onramp/src/main/java/com/tangem/data/onramp/DefaultOnrampRepository.kt b/data/onramp/src/main/java/com/tangem/data/onramp/DefaultOnrampRepository.kt index 7ab90c6574..7d5e1ad71d 100644 --- a/data/onramp/src/main/java/com/tangem/data/onramp/DefaultOnrampRepository.kt +++ b/data/onramp/src/main/java/com/tangem/data/onramp/DefaultOnrampRepository.kt @@ -29,9 +29,7 @@ import com.tangem.datasource.local.onramp.currencies.OnrampCurrenciesStore import com.tangem.datasource.local.onramp.pairs.OnrampPairsStore import com.tangem.datasource.local.onramp.paymentmethods.OnrampPaymentMethodsStore import com.tangem.datasource.local.onramp.quotes.OnrampQuotesStore -import com.tangem.datasource.local.onramp.sepa.OnrampCurrentCountryByIPStore -import com.tangem.datasource.local.onramp.sepa.OnrampSepaAvailabilityStore -import com.tangem.datasource.local.onramp.sepa.OnrampSepaAvailabilityStoreKey +import com.tangem.datasource.local.onramp.country.OnrampCurrentCountryByIPStore import com.tangem.datasource.local.preferences.AppPreferencesStore import com.tangem.datasource.local.preferences.PreferencesKeys import com.tangem.datasource.local.preferences.utils.getObject @@ -67,7 +65,6 @@ internal class DefaultOnrampRepository( private val dispatchers: CoroutineDispatcherProvider, private val appPreferencesStore: AppPreferencesStore, private val paymentMethodsStore: OnrampPaymentMethodsStore, - private val onrampSepaAvailabilityStore: OnrampSepaAvailabilityStore, private val onrampCurrentCountryByIPStore: OnrampCurrentCountryByIPStore, private val pairsStore: OnrampPairsStore, private val quotesStore: OnrampQuotesStore, @@ -281,62 +278,6 @@ internal class DefaultOnrampRepository( storeOnrampPairs(pairs = onrampPairs.await(), providers = providers.await()) } - override suspend fun hasSepaMethod( - userWallet: UserWallet, - country: OnrampCountry, - cryptoCurrency: CryptoCurrency, - ): Boolean { - return withContext(dispatchers.io) { - val key = OnrampSepaAvailabilityStoreKey( - userWallet = userWallet, - country = country, - cryptoCurrency = cryptoCurrency, - ) - - val isCachedValue = onrampSepaAvailabilityStore.getSyncOrNull(key) - - if (isCachedValue != null) { - return@withContext isCachedValue - } - - val onrampPairs = - safeApiCall( - call = { - onrampApi.getPairs( - userWalletId = userWallet.walletId.stringValue, - refCode = ExpressUtils.getRefCode( - userWallet = userWallet, - appPreferencesStore = appPreferencesStore, - ), - body = OnrampPairsRequest( - fromCurrencyCode = EUR_CURRENCY_CODE, - countryCode = country.code, - to = listOf( - OnrampDestinationDTO( - contractAddress = cryptoCurrency.getContractAddress(), - network = cryptoCurrency.network.rawId, - ), - ), - ), - ).bind() - }, - onError = { error -> - TangemLogger.w("Unable to fetch onramp pairs", error) - throw error - }, - ) - - val hasSepaMethod = onrampPairs - .flatMap { it.providers } - .flatMap { it.paymentMethods } - .any { it == SEPA_METHOD_ID } - - onrampSepaAvailabilityStore.store(key, hasSepaMethod) - - hasSepaMethod - } - } - override suspend fun fetchQuotes(userWallet: UserWallet, cryptoCurrency: CryptoCurrency, amount: Amount) = withContext(dispatchers.io) { val pairs = requireNotNull(pairsStore.getSyncOrNull(PAIRS_KEY)) { @@ -632,8 +573,5 @@ internal class DefaultOnrampRepository( const val PROVIDER_THEME_LIGHT = "light" const val REDIRECT_URL = "https://tangem.com/onramp" - - const val SEPA_METHOD_ID = "sepa" - const val EUR_CURRENCY_CODE = "EUR" } } \ No newline at end of file diff --git a/data/onramp/src/main/java/com/tangem/data/onramp/di/OnrampDataModule.kt b/data/onramp/src/main/java/com/tangem/data/onramp/di/OnrampDataModule.kt index 7e95788c7a..1bc9b8d1ea 100644 --- a/data/onramp/src/main/java/com/tangem/data/onramp/di/OnrampDataModule.kt +++ b/data/onramp/src/main/java/com/tangem/data/onramp/di/OnrampDataModule.kt @@ -24,8 +24,7 @@ import com.tangem.datasource.local.onramp.currencies.OnrampCurrenciesStore import com.tangem.datasource.local.onramp.pairs.OnrampPairsStore import com.tangem.datasource.local.onramp.paymentmethods.OnrampPaymentMethodsStore import com.tangem.datasource.local.onramp.quotes.OnrampQuotesStore -import com.tangem.datasource.local.onramp.sepa.OnrampCurrentCountryByIPStore -import com.tangem.datasource.local.onramp.sepa.OnrampSepaAvailabilityStore +import com.tangem.datasource.local.onramp.country.OnrampCurrentCountryByIPStore import com.tangem.datasource.local.preferences.AppPreferencesStore import com.tangem.domain.common.wallets.UserWalletsListRepository import com.tangem.utils.coroutines.AppCoroutineScope @@ -56,7 +55,6 @@ internal object OnrampDataModule { currenciesStore: OnrampCurrenciesStore, walletManagersFacade: WalletManagersFacade, dataSignatureVerifier: DataSignatureVerifier, - onrampSepaAvailabilityStore: OnrampSepaAvailabilityStore, onrampCurrentCountryByIPStore: OnrampCurrentCountryByIPStore, @NetworkMoshi moshi: Moshi, ): OnrampRepository { @@ -66,7 +64,6 @@ internal object OnrampDataModule { dispatchers = dispatchers, appPreferencesStore = appPreferencesStore, paymentMethodsStore = paymentMethodsStore, - onrampSepaAvailabilityStore = onrampSepaAvailabilityStore, onrampCurrentCountryByIPStore = onrampCurrentCountryByIPStore, pairsStore = pairsStore, quotesStore = quotesStore, diff --git a/domain/onramp/src/main/java/com/tangem/domain/onramp/OnrampSepaAvailableUseCase.kt b/domain/onramp/src/main/java/com/tangem/domain/onramp/OnrampSepaAvailableUseCase.kt deleted file mode 100644 index 6fd0b223d9..0000000000 --- a/domain/onramp/src/main/java/com/tangem/domain/onramp/OnrampSepaAvailableUseCase.kt +++ /dev/null @@ -1,77 +0,0 @@ -package com.tangem.domain.onramp - -import arrow.core.Either -import arrow.core.getOrElse -import com.tangem.domain.models.currency.CryptoCurrency -import com.tangem.domain.onramp.repositories.OnrampRepository -import com.tangem.domain.models.wallet.UserWallet -import com.tangem.domain.onramp.model.OnrampCountry - -class OnrampSepaAvailableUseCase( - private val repository: OnrampRepository, -) { - - suspend operator fun invoke( - userWallet: UserWallet, - country: OnrampCountry, - cryptoCurrency: CryptoCurrency, - ): Boolean { - if (country.code !in SEPA_AVAILABLE_COUNTRY_CODES) { - return false - } - - return Either.catch { - repository.hasSepaMethod( - userWallet = userWallet, - country = country, - cryptoCurrency = cryptoCurrency, - ) - }.getOrElse { false } - } - - companion object { - val SEPA_AVAILABLE_COUNTRY_CODES = listOf( - "AL", // Albania - "AD", // Andorra - "AT", // Austria - "BE", // Belgium - "BG", // Bulgaria - "HR", // Croatia - "CY", // Cyprus - "CZ", // Czech Republic - "DK", // Denmark - "EE", // Estonia - "FI", // Finland - "FR", // France - "DE", // Germany - "GR", // Greece - "HU", // Hungary - "IS", // Iceland - "IE", // Ireland - "IT", // Italy - "LV", // Latvia - "LI", // Liechtenstein - "LT", // Lithuania - "LU", // Luxembourg - "MT", // Malta - "MD", // Moldova - "MC", // Monaco - "ME", // Montenegro - "NL", // Netherlands - "MK", // North Macedonia - "NO", // Norway - "PL", // Poland - "PT", // Portugal - "RO", // Romania - "SM", // San Marino - "RS", // Serbia - "SK", // Slovakia - "SI", // Slovenia - "ES", // Spain - "SE", // Sweden - "CH", // Switzerland - "GB", // United Kingdom - "VA", // Vatican City - ) - } -} \ No newline at end of file diff --git a/domain/onramp/src/main/java/com/tangem/domain/onramp/repositories/OnrampRepository.kt b/domain/onramp/src/main/java/com/tangem/domain/onramp/repositories/OnrampRepository.kt index 268ade4d37..1fce408b69 100644 --- a/domain/onramp/src/main/java/com/tangem/domain/onramp/repositories/OnrampRepository.kt +++ b/domain/onramp/src/main/java/com/tangem/domain/onramp/repositories/OnrampRepository.kt @@ -15,7 +15,6 @@ interface OnrampRepository { suspend fun getCountriesSync(): List? suspend fun getCountryByIp(userWallet: UserWallet, fromCache: Boolean = false): OnrampCountry suspend fun getStatus(userWallet: UserWallet, txId: String): OnrampStatus - suspend fun hasSepaMethod(userWallet: UserWallet, country: OnrampCountry, cryptoCurrency: CryptoCurrency): Boolean suspend fun fetchCurrencies(userWallet: UserWallet) suspend fun fetchCountries(userWallet: UserWallet): List suspend fun fetchPaymentMethodsIfAbsent(userWallet: UserWallet) diff --git a/features/feed/impl/src/main/kotlin/com/tangem/features/feed/components/FeedEntryChildFactory.kt b/features/feed/impl/src/main/kotlin/com/tangem/features/feed/components/FeedEntryChildFactory.kt index 5274b83b8d..6c4dafd1a7 100644 --- a/features/feed/impl/src/main/kotlin/com/tangem/features/feed/components/FeedEntryChildFactory.kt +++ b/features/feed/impl/src/main/kotlin/com/tangem/features/feed/components/FeedEntryChildFactory.kt @@ -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, diff --git a/features/onramp/api/src/main/kotlin/com/tangem/features/onramp/component/OnrampComponent.kt b/features/onramp/api/src/main/kotlin/com/tangem/features/onramp/component/OnrampComponent.kt index 66356e9ae5..d77c070bac 100644 --- a/features/onramp/api/src/main/kotlin/com/tangem/features/onramp/component/OnrampComponent.kt +++ b/features/onramp/api/src/main/kotlin/com/tangem/features/onramp/component/OnrampComponent.kt @@ -12,7 +12,6 @@ interface OnrampComponent : ComposableContentComponent { val userWalletId: UserWalletId, val cryptoCurrency: CryptoCurrency, val source: OnrampSource, - val shouldLaunchSepa: Boolean = false, ) interface Factory : ComponentFactory diff --git a/features/onramp/impl/src/main/kotlin/com/tangem/features/onramp/confirmresidency/ConfirmResidencyComponent.kt b/features/onramp/impl/src/main/kotlin/com/tangem/features/onramp/confirmresidency/ConfirmResidencyComponent.kt index 1957e8b15e..11f2ce6cf9 100644 --- a/features/onramp/impl/src/main/kotlin/com/tangem/features/onramp/confirmresidency/ConfirmResidencyComponent.kt +++ b/features/onramp/impl/src/main/kotlin/com/tangem/features/onramp/confirmresidency/ConfirmResidencyComponent.kt @@ -12,7 +12,6 @@ internal interface ConfirmResidencyComponent : ComposableBottomSheetComponent { val userWalletId: UserWalletId, val cryptoCurrency: CryptoCurrency, val country: OnrampCountry, - val isLaunchSepa: Boolean, val onDismiss: () -> Unit, ) diff --git a/features/onramp/impl/src/main/kotlin/com/tangem/features/onramp/confirmresidency/model/ConfirmResidencyModel.kt b/features/onramp/impl/src/main/kotlin/com/tangem/features/onramp/confirmresidency/model/ConfirmResidencyModel.kt index e2d8f30195..00a43be762 100644 --- a/features/onramp/impl/src/main/kotlin/com/tangem/features/onramp/confirmresidency/model/ConfirmResidencyModel.kt +++ b/features/onramp/impl/src/main/kotlin/com/tangem/features/onramp/confirmresidency/model/ConfirmResidencyModel.kt @@ -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() } }, diff --git a/features/onramp/impl/src/main/kotlin/com/tangem/features/onramp/main/DefaultOnrampMainComponent.kt b/features/onramp/impl/src/main/kotlin/com/tangem/features/onramp/main/DefaultOnrampMainComponent.kt index bfcf43a112..cb55143094 100644 --- a/features/onramp/impl/src/main/kotlin/com/tangem/features/onramp/main/DefaultOnrampMainComponent.kt +++ b/features/onramp/impl/src/main/kotlin/com/tangem/features/onramp/main/DefaultOnrampMainComponent.kt @@ -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() diff --git a/features/onramp/impl/src/main/kotlin/com/tangem/features/onramp/utils/model/EurCurrency.kt b/features/onramp/impl/src/main/kotlin/com/tangem/features/onramp/utils/model/EurCurrency.kt deleted file mode 100644 index 6f75fc6908..0000000000 --- a/features/onramp/impl/src/main/kotlin/com/tangem/features/onramp/utils/model/EurCurrency.kt +++ /dev/null @@ -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", -) \ No newline at end of file diff --git a/features/promo-banners/impl/build.gradle.kts b/features/promo-banners/impl/build.gradle.kts index d90d0e2f70..d4c259ae4a 100644 --- a/features/promo-banners/impl/build.gradle.kts +++ b/features/promo-banners/impl/build.gradle.kts @@ -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) diff --git a/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/analytics/TokenDetailsNotificationsAnalyticsSender.kt b/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/analytics/TokenDetailsNotificationsAnalyticsSender.kt index 805a18caa5..8af712a909 100644 --- a/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/analytics/TokenDetailsNotificationsAnalyticsSender.kt +++ b/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/analytics/TokenDetailsNotificationsAnalyticsSender.kt @@ -61,7 +61,6 @@ internal class TokenDetailsNotificationsAnalyticsSender( is TokenDetailsNotification.MigrationClore, is TokenDetailsNotification.UsedOutdatedData, -> null - is TokenDetailsNotification.DynamicAddressesFundsFound -> null // TODO: [REDACTED_TASK_KEY] analytics event } } } \ No newline at end of file diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/domain/GetMultiWalletWarningsFactory.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/domain/GetMultiWalletWarningsFactory.kt index 779bf672b9..1f5af19c6b 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/domain/GetMultiWalletWarningsFactory.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/domain/GetMultiWalletWarningsFactory.kt @@ -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.addYieldSupplyNotifications( - // flattenCurrencies: Lce>, - // ) { - // addIf( - // element = WalletNotification.Warning.YeildSupplyApprove, - // condition = flattenCurrencies.hasTokensWithActivatedSupplyWithoutApprove(), - // ) - // } - private fun MutableList.addWarningNotifications( cardTypesResolver: CardTypesResolver?, flattenCurrencies: List, @@ -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>.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.addAssetsDiscoveryCompletedNotification( userWallet: UserWallet, assetsDiscoveryProgress: AssetsDiscoveryProgress,