diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 5edbbda75f..c9f4634459 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -252,8 +252,8 @@ dependencies { implementation(projects.features.tokendetails.impl) implementation(projects.features.manageTokens.api) implementation(projects.features.manageTokens.impl) - implementation(projects.features.sendV2.api) - implementation(projects.features.sendV2.impl) + implementation(projects.features.send.api) + implementation(projects.features.send.impl) implementation(projects.features.qrScanning.api) implementation(projects.features.qrScanning.impl) implementation(projects.features.staking.api) diff --git a/app/src/androidTest/kotlin/com/tangem/screens/SendAddressPageObject.kt b/app/src/androidTest/kotlin/com/tangem/screens/SendAddressPageObject.kt index be240a7c5a..e16444e9c7 100644 --- a/app/src/androidTest/kotlin/com/tangem/screens/SendAddressPageObject.kt +++ b/app/src/androidTest/kotlin/com/tangem/screens/SendAddressPageObject.kt @@ -6,7 +6,7 @@ import com.tangem.core.ui.test.BaseButtonTestTags import com.tangem.core.ui.test.FooterTestTags import com.tangem.core.ui.test.SendAddressScreenTestTags import com.tangem.core.ui.test.TopAppBarTestTags -import com.tangem.features.send.v2.impl.R +import com.tangem.features.send.impl.R import io.github.kakaocup.compose.node.element.ComposeScreen import io.github.kakaocup.compose.node.element.ComposeScreen.Companion.onComposeScreen import io.github.kakaocup.compose.node.element.KNode diff --git a/app/src/androidTest/kotlin/com/tangem/screens/SendPageObject.kt b/app/src/androidTest/kotlin/com/tangem/screens/SendPageObject.kt index dc63b4a2ed..eb85e56e78 100644 --- a/app/src/androidTest/kotlin/com/tangem/screens/SendPageObject.kt +++ b/app/src/androidTest/kotlin/com/tangem/screens/SendPageObject.kt @@ -9,7 +9,7 @@ import io.github.kakaocup.compose.node.element.ComposeScreen import io.github.kakaocup.compose.node.element.ComposeScreen.Companion.onComposeScreen import io.github.kakaocup.compose.node.element.KNode import io.github.kakaocup.kakao.common.utilities.getResourceString -import com.tangem.features.send.v2.impl.R as SendR +import com.tangem.features.send.impl.R as SendR import androidx.compose.ui.test.hasText as withText class SendPageObject(semanticsProvider: SemanticsNodeInteractionsProvider) : 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 1684f52754..7e1d9dab32 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 @@ -31,9 +31,9 @@ import com.tangem.features.onramp.component.* import com.tangem.features.pushnotifications.api.PushNotificationsComponent import com.tangem.features.pushnotifications.api.PushNotificationsModelCallbacksStub import com.tangem.features.pushnotifications.api.PushNotificationsParams -import com.tangem.features.send.v2.api.NFTSendComponent -import com.tangem.features.send.v2.api.SendComponent -import com.tangem.features.send.v2.api.SendEntryPointComponent +import com.tangem.features.send.api.NFTSendComponent +import com.tangem.features.send.api.SendComponent +import com.tangem.features.send.api.SendEntryPointComponent import com.tangem.features.staking.api.StakingComponent import com.tangem.features.swap.SwapComponent import com.tangem.features.tangempay.components.TangemPayHotWalletOnboardingComponent diff --git a/app/src/main/java/com/tangem/tap/routing/utils/DeepLinkFactory.kt b/app/src/main/java/com/tangem/tap/routing/utils/DeepLinkFactory.kt index e886e10e14..378e230a37 100644 --- a/app/src/main/java/com/tangem/tap/routing/utils/DeepLinkFactory.kt +++ b/app/src/main/java/com/tangem/tap/routing/utils/DeepLinkFactory.kt @@ -17,7 +17,7 @@ import com.tangem.features.onramp.deeplink.BuyDeepLinkHandler import com.tangem.features.onramp.deeplink.OnrampDeepLinkHandler import com.tangem.features.onramp.deeplink.SellDeepLinkHandler import com.tangem.features.onramp.deeplink.SwapDeepLinkHandler -import com.tangem.features.send.v2.api.deeplink.SellRedirectDeepLinkHandler +import com.tangem.features.send.api.deeplink.SellRedirectDeepLinkHandler import com.tangem.features.staking.api.deeplink.StakingDeepLinkHandler import com.tangem.features.survey.deeplink.SurveyDeepLinkHandler import com.tangem.features.tangempay.deeplink.OnboardVisaDeepLinkHandler diff --git a/app/src/test/kotlin/com/tangem/tap/routing/utils/DeepLinkFactoryTest.kt b/app/src/test/kotlin/com/tangem/tap/routing/utils/DeepLinkFactoryTest.kt index ec6b7a11dc..c6cfb8973c 100644 --- a/app/src/test/kotlin/com/tangem/tap/routing/utils/DeepLinkFactoryTest.kt +++ b/app/src/test/kotlin/com/tangem/tap/routing/utils/DeepLinkFactoryTest.kt @@ -16,7 +16,7 @@ import com.tangem.features.onramp.deeplink.BuyDeepLinkHandler import com.tangem.features.onramp.deeplink.OnrampDeepLinkHandler import com.tangem.features.onramp.deeplink.SellDeepLinkHandler import com.tangem.features.onramp.deeplink.SwapDeepLinkHandler -import com.tangem.features.send.v2.api.deeplink.SellRedirectDeepLinkHandler +import com.tangem.features.send.api.deeplink.SellRedirectDeepLinkHandler import com.tangem.features.staking.api.deeplink.StakingDeepLinkHandler import com.tangem.features.tangempay.deeplink.OnboardVisaDeepLinkHandler import com.tangem.features.tangempay.deeplink.TangemPayMainDeepLinkHandler diff --git a/data/tokens/build.gradle.kts b/data/tokens/build.gradle.kts index f4fe69d99c..b56ebe2db3 100644 --- a/data/tokens/build.gradle.kts +++ b/data/tokens/build.gradle.kts @@ -45,7 +45,7 @@ dependencies { // endregion // region Project - Features API - implementation(projects.features.sendV2.api) + implementation(projects.features.send.api) // endregion // region Tangem SDKs diff --git a/data/transaction/build.gradle.kts b/data/transaction/build.gradle.kts index b897279bad..4e8ca65edd 100644 --- a/data/transaction/build.gradle.kts +++ b/data/transaction/build.gradle.kts @@ -34,7 +34,7 @@ dependencies { implementation(projects.domain.demo) /** Api */ - implementation(projects.features.sendV2.api) + implementation(projects.features.send.api) /** DI */ implementation(deps.hilt.android) diff --git a/features/approval/impl/build.gradle.kts b/features/approval/impl/build.gradle.kts index 3b6329bf75..a61451f217 100644 --- a/features/approval/impl/build.gradle.kts +++ b/features/approval/impl/build.gradle.kts @@ -13,7 +13,7 @@ dependencies { /** Feature */ implementation(projects.features.approval.api) - implementation(projects.features.sendV2.api) + implementation(projects.features.send.api) /** Core */ implementation(projects.core.configToggles) diff --git a/features/approval/impl/src/main/java/com/tangem/features/approval/impl/DefaultGiveApprovalComponent.kt b/features/approval/impl/src/main/java/com/tangem/features/approval/impl/DefaultGiveApprovalComponent.kt index 5fc9f69311..03e2bf29c2 100644 --- a/features/approval/impl/src/main/java/com/tangem/features/approval/impl/DefaultGiveApprovalComponent.kt +++ b/features/approval/impl/src/main/java/com/tangem/features/approval/impl/DefaultGiveApprovalComponent.kt @@ -17,10 +17,10 @@ import com.tangem.core.ui.res.TangemTheme import com.tangem.features.approval.api.GiveApprovalComponent import com.tangem.features.approval.impl.model.GiveApprovalModel import com.tangem.features.approval.impl.ui.GiveApprovalContent -import com.tangem.features.send.v2.api.FeeSelectorBlockComponent -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents -import com.tangem.features.send.v2.api.entity.FeeSelectorUM -import com.tangem.features.send.v2.api.params.FeeSelectorParams +import com.tangem.features.send.api.FeeSelectorBlockComponent +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.api.params.FeeSelectorParams import dagger.assisted.Assisted import dagger.assisted.AssistedFactory import dagger.assisted.AssistedInject diff --git a/features/approval/impl/src/main/java/com/tangem/features/approval/impl/model/GiveApprovalModel.kt b/features/approval/impl/src/main/java/com/tangem/features/approval/impl/model/GiveApprovalModel.kt index 2a82f3cbdb..ceabc3db34 100644 --- a/features/approval/impl/src/main/java/com/tangem/features/approval/impl/model/GiveApprovalModel.kt +++ b/features/approval/impl/src/main/java/com/tangem/features/approval/impl/model/GiveApprovalModel.kt @@ -33,10 +33,10 @@ import com.tangem.domain.transaction.usecase.gasless.GetFeeForGaslessUseCase import com.tangem.domain.transaction.usecase.gasless.GetFeeForTokenUseCase import com.tangem.domain.wallets.usecase.GetUserWalletUseCase import com.tangem.features.approval.api.GiveApprovalComponent -import com.tangem.features.send.v2.api.callbacks.FeeSelectorModelCallback -import com.tangem.features.send.v2.api.entity.FeeItem -import com.tangem.features.send.v2.api.entity.FeeSelectorUM -import com.tangem.features.send.v2.api.subcomponents.feeSelector.FeeSelectorReloadTrigger +import com.tangem.features.send.api.callbacks.FeeSelectorModelCallback +import com.tangem.features.send.api.entity.FeeItem +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.api.subcomponents.feeSelector.FeeSelectorReloadTrigger import com.tangem.utils.coroutines.CoroutineDispatcherProvider import com.tangem.utils.logging.TangemLogger import kotlinx.coroutines.flow.MutableStateFlow diff --git a/features/approval/impl/src/main/java/com/tangem/features/approval/impl/ui/GiveApprovalContent.kt b/features/approval/impl/src/main/java/com/tangem/features/approval/impl/ui/GiveApprovalContent.kt index 694623b67a..5d6e9c3384 100644 --- a/features/approval/impl/src/main/java/com/tangem/features/approval/impl/ui/GiveApprovalContent.kt +++ b/features/approval/impl/src/main/java/com/tangem/features/approval/impl/ui/GiveApprovalContent.kt @@ -34,7 +34,7 @@ import com.tangem.core.ui.extensions.* import com.tangem.core.ui.res.TangemTheme import com.tangem.core.ui.res.TangemThemePreview import com.tangem.features.approval.impl.model.GiveApprovalUM -import com.tangem.features.send.v2.api.FeeSelectorBlockComponent +import com.tangem.features.send.api.FeeSelectorBlockComponent import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.persistentListOf diff --git a/features/approval/impl/src/main/java/com/tangem/features/approval/impl/ui/PreviewFeeSelectorBlockComponent.kt b/features/approval/impl/src/main/java/com/tangem/features/approval/impl/ui/PreviewFeeSelectorBlockComponent.kt index a08d796627..7d4fd8af04 100644 --- a/features/approval/impl/src/main/java/com/tangem/features/approval/impl/ui/PreviewFeeSelectorBlockComponent.kt +++ b/features/approval/impl/src/main/java/com/tangem/features/approval/impl/ui/PreviewFeeSelectorBlockComponent.kt @@ -2,8 +2,8 @@ package com.tangem.features.approval.impl.ui import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import com.tangem.features.send.v2.api.FeeSelectorBlockComponent -import com.tangem.features.send.v2.api.entity.FeeSelectorUM +import com.tangem.features.send.api.FeeSelectorBlockComponent +import com.tangem.features.send.api.entity.FeeSelectorUM internal class PreviewFeeSelectorBlockComponent : FeeSelectorBlockComponent { override fun updateState(feeSelectorUM: FeeSelectorUM) { diff --git a/features/approval/impl/src/test/kotlin/com/tangem/features/approval/impl/model/GiveApprovalModelTest.kt b/features/approval/impl/src/test/kotlin/com/tangem/features/approval/impl/model/GiveApprovalModelTest.kt index acf4eaa4da..d24ab18097 100644 --- a/features/approval/impl/src/test/kotlin/com/tangem/features/approval/impl/model/GiveApprovalModelTest.kt +++ b/features/approval/impl/src/test/kotlin/com/tangem/features/approval/impl/model/GiveApprovalModelTest.kt @@ -26,7 +26,7 @@ import com.tangem.domain.transaction.usecase.gasless.GetFeeForGaslessUseCase import com.tangem.domain.transaction.usecase.gasless.GetFeeForTokenUseCase import com.tangem.domain.wallets.usecase.GetUserWalletUseCase import com.tangem.features.approval.api.GiveApprovalComponent -import com.tangem.features.send.v2.api.subcomponents.feeSelector.FeeSelectorReloadTrigger +import com.tangem.features.send.api.subcomponents.feeSelector.FeeSelectorReloadTrigger import com.tangem.utils.coroutines.TestingCoroutineDispatcherProvider import io.mockk.coEvery import io.mockk.coVerify diff --git a/features/feed/impl/build.gradle.kts b/features/feed/impl/build.gradle.kts index 50a5c85d15..e2d888a68b 100644 --- a/features/feed/impl/build.gradle.kts +++ b/features/feed/impl/build.gradle.kts @@ -20,7 +20,7 @@ dependencies { /* Project - API */ api(projects.features.feed.api) api(projects.features.onramp.api) - api(projects.features.sendV2.api) + api(projects.features.send.api) api(projects.features.tokenRecieve.api) api(projects.features.wallet.api) api(projects.features.account.api) diff --git a/features/markets/impl/build.gradle.kts b/features/markets/impl/build.gradle.kts index 78f5e2b66c..c11bf4b2eb 100644 --- a/features/markets/impl/build.gradle.kts +++ b/features/markets/impl/build.gradle.kts @@ -15,7 +15,7 @@ dependencies { /* Project - API */ api(projects.features.markets.api) api(projects.features.onramp.api) - api(projects.features.sendV2.api) + api(projects.features.send.api) api(projects.features.tokenRecieve.api) api(projects.features.wallet.api) api(projects.features.account.api) diff --git a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/SendFeatureToggles.kt b/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/SendFeatureToggles.kt deleted file mode 100644 index 4dbf452662..0000000000 --- a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/SendFeatureToggles.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.tangem.features.send.v2.api - -interface SendFeatureToggles \ No newline at end of file diff --git a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/callbacks/FeeSelectorModelCallback.kt b/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/callbacks/FeeSelectorModelCallback.kt deleted file mode 100644 index fddf1b5f57..0000000000 --- a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/callbacks/FeeSelectorModelCallback.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.tangem.features.send.v2.api.callbacks - -import com.tangem.features.send.v2.api.entity.FeeSelectorUM - -interface FeeSelectorModelCallback { - fun onFeeResult(feeSelectorUM: FeeSelectorUM) -} \ No newline at end of file diff --git a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/notifications/SendNotificationsUpdateTrigger.kt b/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/notifications/SendNotificationsUpdateTrigger.kt deleted file mode 100644 index 54c33ec881..0000000000 --- a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/notifications/SendNotificationsUpdateTrigger.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.tangem.features.send.v2.api.subcomponents.notifications - -import com.tangem.features.send.v2.api.SendNotificationsComponent.Params.NotificationData - -interface SendNotificationsUpdateTrigger { - /** Trigger return callback with check result */ - suspend fun callbackHasError(hasError: Boolean) - - /** Trigger fee check reload */ - suspend fun triggerUpdate(data: NotificationData) -} \ No newline at end of file diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/FeeSelectorComponentParams.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/FeeSelectorComponentParams.kt deleted file mode 100644 index 337a87186a..0000000000 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/FeeSelectorComponentParams.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.tangem.features.send.v2.feeselector.component - -import com.tangem.features.send.v2.api.entity.FeeSelectorUM -import com.tangem.features.send.v2.api.params.FeeSelectorParams -import com.tangem.features.send.v2.feeselector.model.FeeSelectorIntents -import kotlinx.coroutines.flow.MutableStateFlow - -internal class FeeSelectorComponentParams( - val parentParams: FeeSelectorParams.FeeSelectorDetailsParams, - val state: MutableStateFlow, - val intents: FeeSelectorIntents, -) \ No newline at end of file diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/ui/state/NFTSendUM.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/ui/state/NFTSendUM.kt deleted file mode 100644 index f0b22e8e61..0000000000 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/ui/state/NFTSendUM.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.tangem.features.send.v2.sendnft.ui.state - -import com.tangem.common.ui.navigationButtons.NavigationUM -import com.tangem.features.send.v2.api.entity.FeeSelectorUM -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationUM -import com.tangem.features.send.v2.common.ui.state.ConfirmUM - -internal data class NFTSendUM( - val destinationUM: DestinationUM, - val feeSelectorUM: FeeSelectorUM, - val confirmUM: ConfirmUM, - val navigationUM: NavigationUM, -) \ No newline at end of file diff --git a/features/send-v2/api/.gitignore b/features/send/api/.gitignore similarity index 100% rename from features/send-v2/api/.gitignore rename to features/send/api/.gitignore diff --git a/features/send-v2/api/build.gradle.kts b/features/send/api/build.gradle.kts similarity index 96% rename from features/send-v2/api/build.gradle.kts rename to features/send/api/build.gradle.kts index d66bba02d0..9693ed2048 100644 --- a/features/send-v2/api/build.gradle.kts +++ b/features/send/api/build.gradle.kts @@ -5,7 +5,7 @@ plugins { } android { - namespace = "com.tangem.features.send.v2.api" + namespace = "com.tangem.features.send.api" } dependencies { /** Core */ diff --git a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/FeeSelectorBlockComponent.kt b/features/send/api/src/main/java/com/tangem/features/send/api/FeeSelectorBlockComponent.kt similarity index 75% rename from features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/FeeSelectorBlockComponent.kt rename to features/send/api/src/main/java/com/tangem/features/send/api/FeeSelectorBlockComponent.kt index dfa21df77c..ba927c8159 100644 --- a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/FeeSelectorBlockComponent.kt +++ b/features/send/api/src/main/java/com/tangem/features/send/api/FeeSelectorBlockComponent.kt @@ -1,9 +1,9 @@ -package com.tangem.features.send.v2.api +package com.tangem.features.send.api import com.tangem.core.decompose.context.AppComponentContext import com.tangem.core.ui.decompose.ComposableContentComponent -import com.tangem.features.send.v2.api.entity.FeeSelectorUM -import com.tangem.features.send.v2.api.params.FeeSelectorParams +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.api.params.FeeSelectorParams interface FeeSelectorBlockComponent : ComposableContentComponent { diff --git a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/FeeSelectorComponent.kt b/features/send/api/src/main/java/com/tangem/features/send/api/FeeSelectorComponent.kt similarity index 80% rename from features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/FeeSelectorComponent.kt rename to features/send/api/src/main/java/com/tangem/features/send/api/FeeSelectorComponent.kt index ff1e8703c9..ec13f68cb9 100644 --- a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/FeeSelectorComponent.kt +++ b/features/send/api/src/main/java/com/tangem/features/send/api/FeeSelectorComponent.kt @@ -1,8 +1,8 @@ -package com.tangem.features.send.v2.api +package com.tangem.features.send.api import com.tangem.core.decompose.context.AppComponentContext import com.tangem.core.ui.decompose.ComposableBottomSheetComponent -import com.tangem.features.send.v2.api.params.FeeSelectorParams +import com.tangem.features.send.api.params.FeeSelectorParams interface FeeSelectorComponent : ComposableBottomSheetComponent { interface Factory { diff --git a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/NFTSendComponent.kt b/features/send/api/src/main/java/com/tangem/features/send/api/NFTSendComponent.kt similarity index 92% rename from features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/NFTSendComponent.kt rename to features/send/api/src/main/java/com/tangem/features/send/api/NFTSendComponent.kt index d030a2305c..50b739e57a 100644 --- a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/NFTSendComponent.kt +++ b/features/send/api/src/main/java/com/tangem/features/send/api/NFTSendComponent.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.api +package com.tangem.features.send.api import com.tangem.core.decompose.factory.ComponentFactory import com.tangem.core.ui.decompose.ComposableContentComponent diff --git a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/NetworkSelectionComponent.kt b/features/send/api/src/main/java/com/tangem/features/send/api/NetworkSelectionComponent.kt similarity index 96% rename from features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/NetworkSelectionComponent.kt rename to features/send/api/src/main/java/com/tangem/features/send/api/NetworkSelectionComponent.kt index 3214424d10..51555ea434 100644 --- a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/NetworkSelectionComponent.kt +++ b/features/send/api/src/main/java/com/tangem/features/send/api/NetworkSelectionComponent.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.api +package com.tangem.features.send.api import com.tangem.core.decompose.factory.ComponentFactory import com.tangem.core.ui.decompose.ComposableDialogComponent diff --git a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/SendComponent.kt b/features/send/api/src/main/java/com/tangem/features/send/api/SendComponent.kt similarity index 95% rename from features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/SendComponent.kt rename to features/send/api/src/main/java/com/tangem/features/send/api/SendComponent.kt index 1da68c6bc2..2d7cb35fa5 100644 --- a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/SendComponent.kt +++ b/features/send/api/src/main/java/com/tangem/features/send/api/SendComponent.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.api +package com.tangem.features.send.api import com.tangem.core.decompose.factory.ComponentFactory import com.tangem.core.ui.decompose.ComposableContentComponent diff --git a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/SendEntryPointComponent.kt b/features/send/api/src/main/java/com/tangem/features/send/api/SendEntryPointComponent.kt similarity index 92% rename from features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/SendEntryPointComponent.kt rename to features/send/api/src/main/java/com/tangem/features/send/api/SendEntryPointComponent.kt index 8ce7d6de46..546a470a6e 100644 --- a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/SendEntryPointComponent.kt +++ b/features/send/api/src/main/java/com/tangem/features/send/api/SendEntryPointComponent.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.api +package com.tangem.features.send.api import com.tangem.core.decompose.factory.ComponentFactory import com.tangem.core.ui.decompose.ComposableContentComponent diff --git a/features/send/api/src/main/java/com/tangem/features/send/api/SendFeatureToggles.kt b/features/send/api/src/main/java/com/tangem/features/send/api/SendFeatureToggles.kt new file mode 100644 index 0000000000..38ac439890 --- /dev/null +++ b/features/send/api/src/main/java/com/tangem/features/send/api/SendFeatureToggles.kt @@ -0,0 +1,3 @@ +package com.tangem.features.send.api + +interface SendFeatureToggles \ No newline at end of file diff --git a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/SendNotificationsComponent.kt b/features/send/api/src/main/java/com/tangem/features/send/api/SendNotificationsComponent.kt similarity index 97% rename from features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/SendNotificationsComponent.kt rename to features/send/api/src/main/java/com/tangem/features/send/api/SendNotificationsComponent.kt index 8e8192a6db..1a468d979c 100644 --- a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/SendNotificationsComponent.kt +++ b/features/send/api/src/main/java/com/tangem/features/send/api/SendNotificationsComponent.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.api +package com.tangem.features.send.api import androidx.compose.foundation.lazy.LazyListScope import androidx.compose.ui.Modifier diff --git a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/analytics/CommonSendAnalyticEvents.kt b/features/send/api/src/main/java/com/tangem/features/send/api/analytics/CommonSendAnalyticEvents.kt similarity index 99% rename from features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/analytics/CommonSendAnalyticEvents.kt rename to features/send/api/src/main/java/com/tangem/features/send/api/analytics/CommonSendAnalyticEvents.kt index f31cb41c2a..db765e3e92 100644 --- a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/analytics/CommonSendAnalyticEvents.kt +++ b/features/send/api/src/main/java/com/tangem/features/send/api/analytics/CommonSendAnalyticEvents.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.api.analytics +package com.tangem.features.send.api.analytics import com.tangem.core.analytics.models.AnalyticsEvent import com.tangem.core.analytics.models.AnalyticsParam.Key.BLOCKCHAIN diff --git a/features/send/api/src/main/java/com/tangem/features/send/api/callbacks/FeeSelectorModelCallback.kt b/features/send/api/src/main/java/com/tangem/features/send/api/callbacks/FeeSelectorModelCallback.kt new file mode 100644 index 0000000000..429b0bf0e4 --- /dev/null +++ b/features/send/api/src/main/java/com/tangem/features/send/api/callbacks/FeeSelectorModelCallback.kt @@ -0,0 +1,7 @@ +package com.tangem.features.send.api.callbacks + +import com.tangem.features.send.api.entity.FeeSelectorUM + +interface FeeSelectorModelCallback { + fun onFeeResult(feeSelectorUM: FeeSelectorUM) +} \ No newline at end of file diff --git a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/deeplink/SellRedirectDeepLinkHandler.kt b/features/send/api/src/main/java/com/tangem/features/send/api/deeplink/SellRedirectDeepLinkHandler.kt similarity index 82% rename from features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/deeplink/SellRedirectDeepLinkHandler.kt rename to features/send/api/src/main/java/com/tangem/features/send/api/deeplink/SellRedirectDeepLinkHandler.kt index a9d945790b..5b680cd71d 100644 --- a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/deeplink/SellRedirectDeepLinkHandler.kt +++ b/features/send/api/src/main/java/com/tangem/features/send/api/deeplink/SellRedirectDeepLinkHandler.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.api.deeplink +package com.tangem.features.send.api.deeplink import kotlinx.coroutines.CoroutineScope diff --git a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/entity/CustomFeeFieldUM.kt b/features/send/api/src/main/java/com/tangem/features/send/api/entity/CustomFeeFieldUM.kt similarity index 92% rename from features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/entity/CustomFeeFieldUM.kt rename to features/send/api/src/main/java/com/tangem/features/send/api/entity/CustomFeeFieldUM.kt index d080949eb6..7fbc332f08 100644 --- a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/entity/CustomFeeFieldUM.kt +++ b/features/send/api/src/main/java/com/tangem/features/send/api/entity/CustomFeeFieldUM.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.api.entity +package com.tangem.features.send.api.entity import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions diff --git a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/entity/FeeSelectorUM.kt b/features/send/api/src/main/java/com/tangem/features/send/api/entity/FeeSelectorUM.kt similarity index 91% rename from features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/entity/FeeSelectorUM.kt rename to features/send/api/src/main/java/com/tangem/features/send/api/entity/FeeSelectorUM.kt index f903e9ca35..dbbdb74b2a 100644 --- a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/entity/FeeSelectorUM.kt +++ b/features/send/api/src/main/java/com/tangem/features/send/api/entity/FeeSelectorUM.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.api.entity +package com.tangem.features.send.api.entity import androidx.compose.runtime.Immutable import com.tangem.blockchain.common.Amount @@ -12,8 +12,7 @@ import com.tangem.domain.appcurrency.model.AppCurrency import com.tangem.domain.models.currency.CryptoCurrencyStatus import com.tangem.domain.transaction.error.GetFeeError import com.tangem.domain.transaction.models.TransactionFeeExtended -import com.tangem.features.send.v2.api.R -import com.tangem.features.send.v2.api.entity.FeeItem.* +import com.tangem.features.send.api.R import kotlinx.collections.immutable.ImmutableList import java.math.BigDecimal import java.math.BigInteger @@ -46,12 +45,12 @@ sealed class FeeSelectorUM { fun toAnalyticType(): AnalyticsParam.FeeType = when (fees) { is TransactionFee.Single -> AnalyticsParam.FeeType.Fixed is TransactionFee.Choosable -> when (selectedFeeItem) { - is Suggested, - is Custom, + is FeeItem.Suggested, + is FeeItem.Custom, -> AnalyticsParam.FeeType.Custom - is Fast -> AnalyticsParam.FeeType.Max - is Market, is FeeItem.Loading -> AnalyticsParam.FeeType.Normal - is Slow -> AnalyticsParam.FeeType.Min + is FeeItem.Fast -> AnalyticsParam.FeeType.Max + is FeeItem.Market, is FeeItem.Loading -> AnalyticsParam.FeeType.Normal + is FeeItem.Slow -> AnalyticsParam.FeeType.Min } } } diff --git a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/entity/PredefinedValues.kt b/features/send/api/src/main/java/com/tangem/features/send/api/entity/PredefinedValues.kt similarity index 95% rename from features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/entity/PredefinedValues.kt rename to features/send/api/src/main/java/com/tangem/features/send/api/entity/PredefinedValues.kt index 8cfa7f93da..93b515d71b 100644 --- a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/entity/PredefinedValues.kt +++ b/features/send/api/src/main/java/com/tangem/features/send/api/entity/PredefinedValues.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.api.entity +package com.tangem.features.send.api.entity sealed class PredefinedValues { data object Empty : PredefinedValues() diff --git a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/entry/SendEntryRoute.kt b/features/send/api/src/main/java/com/tangem/features/send/api/entry/SendEntryRoute.kt similarity index 91% rename from features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/entry/SendEntryRoute.kt rename to features/send/api/src/main/java/com/tangem/features/send/api/entry/SendEntryRoute.kt index ae701c2f99..caea53b700 100644 --- a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/entry/SendEntryRoute.kt +++ b/features/send/api/src/main/java/com/tangem/features/send/api/entry/SendEntryRoute.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.api.entry +package com.tangem.features.send.api.entry import com.tangem.core.decompose.navigation.Route diff --git a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/params/FeeSelectorParams.kt b/features/send/api/src/main/java/com/tangem/features/send/api/params/FeeSelectorParams.kt similarity index 93% rename from features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/params/FeeSelectorParams.kt rename to features/send/api/src/main/java/com/tangem/features/send/api/params/FeeSelectorParams.kt index 105aa58c22..138dcbbf64 100644 --- a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/params/FeeSelectorParams.kt +++ b/features/send/api/src/main/java/com/tangem/features/send/api/params/FeeSelectorParams.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.api.params +package com.tangem.features.send.api.params import arrow.core.Either import com.tangem.blockchain.common.transaction.Fee @@ -8,9 +8,9 @@ import com.tangem.domain.models.currency.CryptoCurrencyStatus import com.tangem.domain.models.wallet.UserWalletId import com.tangem.domain.transaction.error.GetFeeError import com.tangem.domain.transaction.models.TransactionFeeExtended -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents -import com.tangem.features.send.v2.api.callbacks.FeeSelectorModelCallback -import com.tangem.features.send.v2.api.entity.FeeSelectorUM +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents +import com.tangem.features.send.api.callbacks.FeeSelectorModelCallback +import com.tangem.features.send.api.entity.FeeSelectorUM sealed class FeeSelectorParams { abstract val state: FeeSelectorUM diff --git a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/amount/analytics/CommonSendAmountAnalyticEvents.kt b/features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/amount/analytics/CommonSendAmountAnalyticEvents.kt similarity index 90% rename from features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/amount/analytics/CommonSendAmountAnalyticEvents.kt rename to features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/amount/analytics/CommonSendAmountAnalyticEvents.kt index cfc6409387..0069ef2c84 100644 --- a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/amount/analytics/CommonSendAmountAnalyticEvents.kt +++ b/features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/amount/analytics/CommonSendAmountAnalyticEvents.kt @@ -1,11 +1,11 @@ -package com.tangem.features.send.v2.api.subcomponents.amount.analytics +package com.tangem.features.send.api.subcomponents.amount.analytics import com.tangem.core.analytics.models.AnalyticsEvent import com.tangem.core.analytics.models.AnalyticsParam.Key.BLOCKCHAIN import com.tangem.core.analytics.models.AnalyticsParam.Key.SOURCE import com.tangem.core.analytics.models.AnalyticsParam.Key.TOKEN_PARAM import com.tangem.core.analytics.models.AnalyticsParam.Key.TYPE -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents sealed class CommonSendAmountAnalyticEvents( category: String, diff --git a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/destination/DestinationRoute.kt b/features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/destination/DestinationRoute.kt similarity index 60% rename from features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/destination/DestinationRoute.kt rename to features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/destination/DestinationRoute.kt index a78eb8e11a..c83ce3ebf0 100644 --- a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/destination/DestinationRoute.kt +++ b/features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/destination/DestinationRoute.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.api.subcomponents.destination +package com.tangem.features.send.api.subcomponents.destination /** * Common route for destination diff --git a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/destination/SendDestinationBlockComponent.kt b/features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/destination/SendDestinationBlockComponent.kt similarity index 77% rename from features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/destination/SendDestinationBlockComponent.kt rename to features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/destination/SendDestinationBlockComponent.kt index 6ca3b9f4f7..56e2836665 100644 --- a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/destination/SendDestinationBlockComponent.kt +++ b/features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/destination/SendDestinationBlockComponent.kt @@ -1,8 +1,8 @@ -package com.tangem.features.send.v2.api.subcomponents.destination +package com.tangem.features.send.api.subcomponents.destination import com.tangem.core.decompose.context.AppComponentContext import com.tangem.core.ui.decompose.ComposableContentComponent -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationUM +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationUM interface SendDestinationBlockComponent : ComposableContentComponent { diff --git a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/destination/SendDestinationComponent.kt b/features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/destination/SendDestinationComponent.kt similarity index 78% rename from features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/destination/SendDestinationComponent.kt rename to features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/destination/SendDestinationComponent.kt index 2c2a232547..6a323c5bf3 100644 --- a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/destination/SendDestinationComponent.kt +++ b/features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/destination/SendDestinationComponent.kt @@ -1,9 +1,9 @@ -package com.tangem.features.send.v2.api.subcomponents.destination +package com.tangem.features.send.api.subcomponents.destination import com.tangem.common.ui.navigationButtons.NavigationModelCallback import com.tangem.core.decompose.factory.ComponentFactory import com.tangem.core.ui.decompose.ComposableContentComponent -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationUM +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationUM interface SendDestinationComponent : ComposableContentComponent { diff --git a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/destination/SendDestinationComponentParams.kt b/features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/destination/SendDestinationComponentParams.kt similarity index 85% rename from features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/destination/SendDestinationComponentParams.kt rename to features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/destination/SendDestinationComponentParams.kt index 3c5613e62e..e4879499a7 100644 --- a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/destination/SendDestinationComponentParams.kt +++ b/features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/destination/SendDestinationComponentParams.kt @@ -1,11 +1,11 @@ -package com.tangem.features.send.v2.api.subcomponents.destination +package com.tangem.features.send.api.subcomponents.destination import com.tangem.core.ui.extensions.TextReference import com.tangem.domain.models.currency.CryptoCurrency import com.tangem.domain.models.wallet.UserWalletId -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents -import com.tangem.features.send.v2.api.entity.PredefinedValues -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationUM +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents +import com.tangem.features.send.api.entity.PredefinedValues +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationUM import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.StateFlow diff --git a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/destination/entity/DestinationRecipientListUM.kt b/features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/destination/entity/DestinationRecipientListUM.kt similarity index 80% rename from features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/destination/entity/DestinationRecipientListUM.kt rename to features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/destination/entity/DestinationRecipientListUM.kt index ff6a22684a..61f37d6726 100644 --- a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/destination/entity/DestinationRecipientListUM.kt +++ b/features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/destination/entity/DestinationRecipientListUM.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.api.subcomponents.destination.entity +package com.tangem.features.send.api.subcomponents.destination.entity import androidx.annotation.DrawableRes import androidx.compose.runtime.Immutable @@ -11,8 +11,8 @@ import com.tangem.domain.models.wallet.UserWalletId @Immutable data class DestinationRecipientListUM( val id: String, - val title: TextReference = TextReference.Companion.EMPTY, - val subtitle: TextReference = TextReference.Companion.EMPTY, + val title: TextReference = TextReference.EMPTY, + val subtitle: TextReference = TextReference.EMPTY, val accountTitleUM: AccountTitleUM.Account? = null, val timestamp: TextReference? = null, val subtitleEndOffset: Int = 0, diff --git a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/destination/entity/DestinationTextFieldUM.kt b/features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/destination/entity/DestinationTextFieldUM.kt similarity index 96% rename from features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/destination/entity/DestinationTextFieldUM.kt rename to features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/destination/entity/DestinationTextFieldUM.kt index 725f9af80f..00dc80f599 100644 --- a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/destination/entity/DestinationTextFieldUM.kt +++ b/features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/destination/entity/DestinationTextFieldUM.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.api.subcomponents.destination.entity +package com.tangem.features.send.api.subcomponents.destination.entity import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.runtime.Immutable diff --git a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/destination/entity/DestinationUM.kt b/features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/destination/entity/DestinationUM.kt similarity index 92% rename from features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/destination/entity/DestinationUM.kt rename to features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/destination/entity/DestinationUM.kt index f84dae8eec..51a2d86ae4 100644 --- a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/destination/entity/DestinationUM.kt +++ b/features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/destination/entity/DestinationUM.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.api.subcomponents.destination.entity +package com.tangem.features.send.api.subcomponents.destination.entity import androidx.compose.runtime.Immutable import kotlinx.collections.immutable.ImmutableList diff --git a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/feeSelector/FeeSelectorCheckReloadTrigger.kt b/features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/feeSelector/FeeSelectorCheckReloadTrigger.kt similarity index 89% rename from features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/feeSelector/FeeSelectorCheckReloadTrigger.kt rename to features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/feeSelector/FeeSelectorCheckReloadTrigger.kt index 7434a0fe03..cfe5ed9d4c 100644 --- a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/feeSelector/FeeSelectorCheckReloadTrigger.kt +++ b/features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/feeSelector/FeeSelectorCheckReloadTrigger.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.api.subcomponents.feeSelector +package com.tangem.features.send.api.subcomponents.feeSelector import kotlinx.coroutines.flow.Flow diff --git a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/feeSelector/FeeSelectorReloadTrigger.kt b/features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/feeSelector/FeeSelectorReloadTrigger.kt similarity index 80% rename from features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/feeSelector/FeeSelectorReloadTrigger.kt rename to features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/feeSelector/FeeSelectorReloadTrigger.kt index 06b2670968..bff05d00d6 100644 --- a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/feeSelector/FeeSelectorReloadTrigger.kt +++ b/features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/feeSelector/FeeSelectorReloadTrigger.kt @@ -1,6 +1,6 @@ -package com.tangem.features.send.v2.api.subcomponents.feeSelector +package com.tangem.features.send.api.subcomponents.feeSelector -import com.tangem.features.send.v2.api.subcomponents.feeSelector.entity.FeeSelectorData +import com.tangem.features.send.api.subcomponents.feeSelector.entity.FeeSelectorData import kotlinx.coroutines.flow.Flow interface FeeSelectorReloadTrigger { diff --git a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/feeSelector/analytics/CommonSendFeeAnalyticEvents.kt b/features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/feeSelector/analytics/CommonSendFeeAnalyticEvents.kt similarity index 89% rename from features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/feeSelector/analytics/CommonSendFeeAnalyticEvents.kt rename to features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/feeSelector/analytics/CommonSendFeeAnalyticEvents.kt index e91e35e365..746e8ded19 100644 --- a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/feeSelector/analytics/CommonSendFeeAnalyticEvents.kt +++ b/features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/feeSelector/analytics/CommonSendFeeAnalyticEvents.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.api.subcomponents.feeSelector.analytics +package com.tangem.features.send.api.subcomponents.feeSelector.analytics import com.tangem.core.analytics.models.AnalyticsEvent import com.tangem.core.analytics.models.AnalyticsParam @@ -7,7 +7,7 @@ import com.tangem.core.analytics.models.AnalyticsParam.Key.FEE_TOKEN import com.tangem.core.analytics.models.AnalyticsParam.Key.FEE_TYPE import com.tangem.core.analytics.models.AnalyticsParam.Key.SOURCE import com.tangem.core.analytics.models.AnalyticsParam.Key.TOKEN_PARAM -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents.CommonSendSource +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents sealed class CommonSendFeeAnalyticEvents( category: String, @@ -21,7 +21,7 @@ sealed class CommonSendFeeAnalyticEvents( data class SelectedFee( override val categoryName: String, val feeType: AnalyticsParam.FeeType, - val source: CommonSendSource, + val source: CommonSendAnalyticEvents.CommonSendSource, val feeToken: String, val blockchain: String, ) : CommonSendFeeAnalyticEvents( diff --git a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/feeSelector/entity/FeeSelectorData.kt b/features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/feeSelector/entity/FeeSelectorData.kt similarity index 51% rename from features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/feeSelector/entity/FeeSelectorData.kt rename to features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/feeSelector/entity/FeeSelectorData.kt index be6f6de2bb..88bfb97ef9 100644 --- a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/feeSelector/entity/FeeSelectorData.kt +++ b/features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/feeSelector/entity/FeeSelectorData.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.api.subcomponents.feeSelector.entity +package com.tangem.features.send.api.subcomponents.feeSelector.entity data class FeeSelectorData( val isRemoveSuggestedFee: Boolean = false, diff --git a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/feeSelector/utils/FeeCalculationUtils.kt b/features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/feeSelector/utils/FeeCalculationUtils.kt similarity index 95% rename from features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/feeSelector/utils/FeeCalculationUtils.kt rename to features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/feeSelector/utils/FeeCalculationUtils.kt index 3d2db932dc..0890d36b63 100644 --- a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/feeSelector/utils/FeeCalculationUtils.kt +++ b/features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/feeSelector/utils/FeeCalculationUtils.kt @@ -1,11 +1,11 @@ -package com.tangem.features.send.v2.api.subcomponents.feeSelector.utils +package com.tangem.features.send.api.subcomponents.feeSelector.utils import com.tangem.blockchain.common.transaction.TransactionFee import com.tangem.core.ui.utils.parseBigDecimal import com.tangem.core.ui.utils.parseToBigDecimal import com.tangem.domain.models.currency.CryptoCurrencyStatus -import com.tangem.features.send.v2.api.entity.FeeItem -import com.tangem.features.send.v2.api.entity.FeeSelectorUM +import com.tangem.features.send.api.entity.FeeItem +import com.tangem.features.send.api.entity.FeeSelectorUM import com.tangem.utils.extensions.isZero import java.math.BigDecimal import java.math.RoundingMode diff --git a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/notifications/SendNotificationsUpdateListener.kt b/features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/notifications/SendNotificationsUpdateListener.kt similarity index 51% rename from features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/notifications/SendNotificationsUpdateListener.kt rename to features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/notifications/SendNotificationsUpdateListener.kt index c4640cd523..74354016a5 100644 --- a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/notifications/SendNotificationsUpdateListener.kt +++ b/features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/notifications/SendNotificationsUpdateListener.kt @@ -1,11 +1,11 @@ -package com.tangem.features.send.v2.api.subcomponents.notifications +package com.tangem.features.send.api.subcomponents.notifications -import com.tangem.features.send.v2.api.SendNotificationsComponent.Params.NotificationData +import com.tangem.features.send.api.SendNotificationsComponent import kotlinx.coroutines.flow.Flow interface SendNotificationsUpdateListener { /** Flow triggers notifications update */ - val updateTriggerFlow: Flow + val updateTriggerFlow: Flow /** Flow returns whether there is error notifications */ val hasErrorFlow: Flow diff --git a/features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/notifications/SendNotificationsUpdateTrigger.kt b/features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/notifications/SendNotificationsUpdateTrigger.kt new file mode 100644 index 0000000000..aad417f873 --- /dev/null +++ b/features/send/api/src/main/java/com/tangem/features/send/api/subcomponents/notifications/SendNotificationsUpdateTrigger.kt @@ -0,0 +1,11 @@ +package com.tangem.features.send.api.subcomponents.notifications + +import com.tangem.features.send.api.SendNotificationsComponent + +interface SendNotificationsUpdateTrigger { + /** Trigger return callback with check result */ + suspend fun callbackHasError(hasError: Boolean) + + /** Trigger fee check reload */ + suspend fun triggerUpdate(data: SendNotificationsComponent.Params.NotificationData) +} \ No newline at end of file diff --git a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/utils/ConfirmFooterUtils.kt b/features/send/api/src/main/java/com/tangem/features/send/api/utils/ConfirmFooterUtils.kt similarity index 96% rename from features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/utils/ConfirmFooterUtils.kt rename to features/send/api/src/main/java/com/tangem/features/send/api/utils/ConfirmFooterUtils.kt index 4b0d95ede3..5d59305894 100644 --- a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/utils/ConfirmFooterUtils.kt +++ b/features/send/api/src/main/java/com/tangem/features/send/api/utils/ConfirmFooterUtils.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.api.utils +package com.tangem.features.send.api.utils import com.tangem.blockchain.common.Amount import com.tangem.blockchain.common.transaction.Fee @@ -8,7 +8,7 @@ import com.tangem.core.ui.format.bigdecimal.fee import com.tangem.core.ui.format.bigdecimal.fiat import com.tangem.core.ui.format.bigdecimal.format import com.tangem.domain.appcurrency.model.AppCurrency -import com.tangem.features.send.v2.api.R +import com.tangem.features.send.api.R import com.tangem.utils.StringsSigns.COMA_SIGN fun getTronTokenFeeSendingText(fee: Fee.Tron, fiatFee: String, fiatSending: TextReference): TextReference { diff --git a/features/send-v2/api/src/test/java/com/tangem/features/send/v2/api/subcomponents/feeSelector/utils/FeeCalculationUtilsTest.kt b/features/send/api/src/test/java/com/tangem/features/send/api/subcomponents/feeSelector/utils/FeeCalculationUtilsTest.kt similarity index 97% rename from features/send-v2/api/src/test/java/com/tangem/features/send/v2/api/subcomponents/feeSelector/utils/FeeCalculationUtilsTest.kt rename to features/send/api/src/test/java/com/tangem/features/send/api/subcomponents/feeSelector/utils/FeeCalculationUtilsTest.kt index efcc805d31..8cc79f0cbb 100644 --- a/features/send-v2/api/src/test/java/com/tangem/features/send/v2/api/subcomponents/feeSelector/utils/FeeCalculationUtilsTest.kt +++ b/features/send/api/src/test/java/com/tangem/features/send/api/subcomponents/feeSelector/utils/FeeCalculationUtilsTest.kt @@ -1,7 +1,8 @@ -package com.tangem.features.send.v2.api.subcomponents.feeSelector.utils +package com.tangem.features.send.api.subcomponents.feeSelector.utils import com.google.common.truth.Truth.assertThat import com.tangem.domain.models.currency.CryptoCurrencyStatus +import com.tangem.features.send.api.subcomponents.feeSelector.utils.FeeCalculationUtils import io.mockk.mockk import org.junit.jupiter.api.Test import java.math.BigDecimal diff --git a/features/send-v2/impl/.gitignore b/features/send/impl/.gitignore similarity index 100% rename from features/send-v2/impl/.gitignore rename to features/send/impl/.gitignore diff --git a/features/send-v2/impl/build.gradle.kts b/features/send/impl/build.gradle.kts similarity index 97% rename from features/send-v2/impl/build.gradle.kts rename to features/send/impl/build.gradle.kts index 274b9c4580..8fad471329 100644 --- a/features/send-v2/impl/build.gradle.kts +++ b/features/send/impl/build.gradle.kts @@ -8,11 +8,11 @@ plugins { } android { - namespace = "com.tangem.features.send.v2.impl" + namespace = "com.tangem.features.send.impl" } dependencies { /** Api */ - implementation(projects.features.sendV2.api) + implementation(projects.features.send.api) implementation(projects.features.txhistory.api) implementation(projects.features.nft.api) implementation(projects.features.swapV2.api) diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/DefaultSendFeatureToggles.kt b/features/send/impl/src/main/java/com/tangem/features/send/DefaultSendFeatureToggles.kt similarity index 54% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/DefaultSendFeatureToggles.kt rename to features/send/impl/src/main/java/com/tangem/features/send/DefaultSendFeatureToggles.kt index 08569966e9..6c5e2ee2bf 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/DefaultSendFeatureToggles.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/DefaultSendFeatureToggles.kt @@ -1,6 +1,6 @@ -package com.tangem.features.send.v2 +package com.tangem.features.send -import com.tangem.features.send.v2.api.SendFeatureToggles +import com.tangem.features.send.api.SendFeatureToggles import javax.inject.Inject internal class DefaultSendFeatureToggles @Inject constructor() : SendFeatureToggles \ No newline at end of file diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/common/CommonSendRoute.kt b/features/send/impl/src/main/java/com/tangem/features/send/common/CommonSendRoute.kt similarity index 86% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/common/CommonSendRoute.kt rename to features/send/impl/src/main/java/com/tangem/features/send/common/CommonSendRoute.kt index eb7fddfc66..398176faea 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/common/CommonSendRoute.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/common/CommonSendRoute.kt @@ -1,7 +1,7 @@ -package com.tangem.features.send.v2.common +package com.tangem.features.send.common import com.tangem.core.decompose.navigation.Route -import com.tangem.features.send.v2.api.subcomponents.destination.DestinationRoute +import com.tangem.features.send.api.subcomponents.destination.DestinationRoute import kotlinx.serialization.Serializable internal sealed class CommonSendRoute : Route { diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/common/SendBalanceUpdater.kt b/features/send/impl/src/main/java/com/tangem/features/send/common/SendBalanceUpdater.kt similarity index 98% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/common/SendBalanceUpdater.kt rename to features/send/impl/src/main/java/com/tangem/features/send/common/SendBalanceUpdater.kt index c8d81e1c83..e97bef6d18 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/common/SendBalanceUpdater.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/common/SendBalanceUpdater.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.common +package com.tangem.features.send.common import com.tangem.utils.coroutines.AppCoroutineScope import com.tangem.domain.models.currency.CryptoCurrency diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/common/SendConfirmAlertFactory.kt b/features/send/impl/src/main/java/com/tangem/features/send/common/SendConfirmAlertFactory.kt similarity index 95% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/common/SendConfirmAlertFactory.kt rename to features/send/impl/src/main/java/com/tangem/features/send/common/SendConfirmAlertFactory.kt index f8ad03193d..20441a4016 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/common/SendConfirmAlertFactory.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/common/SendConfirmAlertFactory.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.common +package com.tangem.features.send.common import com.tangem.common.ui.alerts.TransactionErrorDialogFactory import com.tangem.core.decompose.di.ModelScoped @@ -7,7 +7,7 @@ import com.tangem.core.ui.extensions.resourceReference import com.tangem.core.ui.message.DialogMessage import com.tangem.core.ui.message.EventMessageAction import com.tangem.domain.transaction.error.SendTransactionError -import com.tangem.features.send.v2.impl.R +import com.tangem.features.send.impl.R import javax.inject.Inject @ModelScoped diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/common/ui/FeeBlockSuccess.kt b/features/send/impl/src/main/java/com/tangem/features/send/common/ui/FeeBlockSuccess.kt similarity index 94% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/common/ui/FeeBlockSuccess.kt rename to features/send/impl/src/main/java/com/tangem/features/send/common/ui/FeeBlockSuccess.kt index c9db856ad1..4bd2d8d965 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/common/ui/FeeBlockSuccess.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/common/ui/FeeBlockSuccess.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.common.ui +package com.tangem.features.send.common.ui import androidx.compose.foundation.background import androidx.compose.foundation.layout.* @@ -15,8 +15,8 @@ import com.tangem.core.ui.format.bigdecimal.crypto import com.tangem.core.ui.format.bigdecimal.fee import com.tangem.core.ui.format.bigdecimal.format import com.tangem.core.ui.res.TangemTheme -import com.tangem.features.send.v2.api.entity.FeeSelectorUM -import com.tangem.features.send.v2.impl.R +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.impl.R @Composable fun FeeBlockSuccess(feeSelectorUM: FeeSelectorUM) { diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/common/ui/SendContent.kt b/features/send/impl/src/main/java/com/tangem/features/send/common/ui/SendContent.kt similarity index 96% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/common/ui/SendContent.kt rename to features/send/impl/src/main/java/com/tangem/features/send/common/ui/SendContent.kt index 43924cbf0e..a0c00f2d22 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/common/ui/SendContent.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/common/ui/SendContent.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.common.ui +package com.tangem.features.send.common.ui import androidx.compose.animation.* import androidx.compose.foundation.background @@ -21,8 +21,8 @@ import com.tangem.core.ui.decompose.ComposableContentComponent import com.tangem.core.ui.extensions.TextReference import com.tangem.core.ui.extensions.resolveReference import com.tangem.core.ui.res.TangemTheme -import com.tangem.features.send.v2.common.CommonSendRoute -import com.tangem.features.send.v2.common.ui.state.ConfirmUM +import com.tangem.features.send.common.CommonSendRoute +import com.tangem.features.send.common.ui.state.ConfirmUM @Composable internal fun SendContent( diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/common/ui/TapHelp.kt b/features/send/impl/src/main/java/com/tangem/features/send/common/ui/TapHelp.kt similarity index 96% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/common/ui/TapHelp.kt rename to features/send/impl/src/main/java/com/tangem/features/send/common/ui/TapHelp.kt index 43251bec2f..ceca392f46 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/common/ui/TapHelp.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/common/ui/TapHelp.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.common.ui +package com.tangem.features.send.common.ui import androidx.compose.foundation.background import androidx.compose.foundation.layout.Column @@ -14,7 +14,7 @@ import androidx.compose.ui.draw.clip import androidx.compose.ui.res.painterResource import com.tangem.core.ui.extensions.stringResourceSafe import com.tangem.core.ui.res.TangemTheme -import com.tangem.features.send.v2.impl.R +import com.tangem.features.send.impl.R import kotlinx.coroutines.delay private const val TAP_HELP_KEY = "TAP_HELP_KEY" diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/common/ui/state/ConfirmUM.kt b/features/send/impl/src/main/java/com/tangem/features/send/common/ui/state/ConfirmUM.kt similarity index 94% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/common/ui/state/ConfirmUM.kt rename to features/send/impl/src/main/java/com/tangem/features/send/common/ui/state/ConfirmUM.kt index 7a63af4176..64c4bc7a53 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/common/ui/state/ConfirmUM.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/common/ui/state/ConfirmUM.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.common.ui.state +package com.tangem.features.send.common.ui.state import androidx.compose.runtime.Immutable import com.tangem.common.ui.notifications.NotificationUM diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/common/utils/SendRouteUtils.kt b/features/send/impl/src/main/java/com/tangem/features/send/common/utils/SendRouteUtils.kt similarity index 87% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/common/utils/SendRouteUtils.kt rename to features/send/impl/src/main/java/com/tangem/features/send/common/utils/SendRouteUtils.kt index eba835865e..8e1878cadc 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/common/utils/SendRouteUtils.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/common/utils/SendRouteUtils.kt @@ -1,10 +1,10 @@ -package com.tangem.features.send.v2.common.utils +package com.tangem.features.send.common.utils import com.arkivanov.decompose.router.stack.ChildStack import com.arkivanov.decompose.value.Value import com.tangem.core.decompose.navigation.Router import com.tangem.core.ui.decompose.ComposableContentComponent -import com.tangem.features.send.v2.common.CommonSendRoute +import com.tangem.features.send.common.CommonSendRoute /** * Workaround to try fix duplicate route crash diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/deeplink/DefaultSellRedirectDeepLinkHandler.kt b/features/send/impl/src/main/java/com/tangem/features/send/deeplink/DefaultSellRedirectDeepLinkHandler.kt similarity index 97% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/deeplink/DefaultSellRedirectDeepLinkHandler.kt rename to features/send/impl/src/main/java/com/tangem/features/send/deeplink/DefaultSellRedirectDeepLinkHandler.kt index dec24258e2..34dae6b817 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/deeplink/DefaultSellRedirectDeepLinkHandler.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/deeplink/DefaultSellRedirectDeepLinkHandler.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.deeplink +package com.tangem.features.send.deeplink import arrow.core.Option import arrow.core.getOrElse @@ -12,7 +12,7 @@ import com.tangem.domain.account.supplier.SingleAccountListSupplier import com.tangem.domain.models.currency.CryptoCurrency import com.tangem.domain.models.wallet.UserWalletId import com.tangem.domain.wallets.usecase.GetSelectedWalletSyncUseCase -import com.tangem.features.send.v2.api.deeplink.SellRedirectDeepLinkHandler +import com.tangem.features.send.api.deeplink.SellRedirectDeepLinkHandler import dagger.assisted.Assisted import dagger.assisted.AssistedFactory import dagger.assisted.AssistedInject diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/deeplink/di/SendDeepLinkModule.kt b/features/send/impl/src/main/java/com/tangem/features/send/deeplink/di/SendDeepLinkModule.kt similarity index 66% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/deeplink/di/SendDeepLinkModule.kt rename to features/send/impl/src/main/java/com/tangem/features/send/deeplink/di/SendDeepLinkModule.kt index 4187cff72b..a746a60fc3 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/deeplink/di/SendDeepLinkModule.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/deeplink/di/SendDeepLinkModule.kt @@ -1,7 +1,7 @@ -package com.tangem.features.send.v2.deeplink.di +package com.tangem.features.send.deeplink.di -import com.tangem.features.send.v2.api.deeplink.SellRedirectDeepLinkHandler -import com.tangem.features.send.v2.deeplink.DefaultSellRedirectDeepLinkHandler +import com.tangem.features.send.api.deeplink.SellRedirectDeepLinkHandler +import com.tangem.features.send.deeplink.DefaultSellRedirectDeepLinkHandler import dagger.Binds import dagger.Module import dagger.hilt.InstallIn diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/di/CommonSendModelModule.kt b/features/send/impl/src/main/java/com/tangem/features/send/di/CommonSendModelModule.kt similarity index 71% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/di/CommonSendModelModule.kt rename to features/send/impl/src/main/java/com/tangem/features/send/di/CommonSendModelModule.kt index c5543d91fe..4f1a7ca185 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/di/CommonSendModelModule.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/di/CommonSendModelModule.kt @@ -1,10 +1,10 @@ -package com.tangem.features.send.v2.di +package com.tangem.features.send.di import com.tangem.core.decompose.di.ModelComponent import com.tangem.core.decompose.model.Model -import com.tangem.features.send.v2.subcomponents.amount.model.SendAmountModel -import com.tangem.features.send.v2.subcomponents.destination.model.SendDestinationModel -import com.tangem.features.send.v2.subcomponents.notifications.model.NotificationsModel +import com.tangem.features.send.subcomponents.amount.model.SendAmountModel +import com.tangem.features.send.subcomponents.destination.model.SendDestinationModel +import com.tangem.features.send.subcomponents.notifications.model.NotificationsModel import dagger.Binds import dagger.Module import dagger.hilt.InstallIn diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/di/SendFeatureModule.kt b/features/send/impl/src/main/java/com/tangem/features/send/di/SendFeatureModule.kt similarity index 59% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/di/SendFeatureModule.kt rename to features/send/impl/src/main/java/com/tangem/features/send/di/SendFeatureModule.kt index a349ed7129..e3dd12db2f 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/di/SendFeatureModule.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/di/SendFeatureModule.kt @@ -1,11 +1,15 @@ -package com.tangem.features.send.v2.di +package com.tangem.features.send.di -import com.tangem.features.send.v2.DefaultSendFeatureToggles -import com.tangem.features.send.v2.api.* -import com.tangem.features.send.v2.entrypoint.DefaultSendEntryPointComponent -import com.tangem.features.send.v2.send.DefaultSendComponent -import com.tangem.features.send.v2.sendnft.DefaultNFTSendComponent -import com.tangem.features.send.v2.subcomponents.notifications.DefaultSendNotificationsComponent +import com.tangem.features.send.DefaultSendFeatureToggles +import com.tangem.features.send.api.NFTSendComponent +import com.tangem.features.send.api.SendComponent +import com.tangem.features.send.api.SendEntryPointComponent +import com.tangem.features.send.api.SendFeatureToggles +import com.tangem.features.send.api.SendNotificationsComponent +import com.tangem.features.send.entrypoint.DefaultSendEntryPointComponent +import com.tangem.features.send.send.DefaultSendComponent +import com.tangem.features.send.sendnft.DefaultNFTSendComponent +import com.tangem.features.send.subcomponents.notifications.DefaultSendNotificationsComponent import dagger.Binds import dagger.Module import dagger.hilt.InstallIn diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/entrypoint/DefaultSendEntryPointComponent.kt b/features/send/impl/src/main/java/com/tangem/features/send/entrypoint/DefaultSendEntryPointComponent.kt similarity index 94% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/entrypoint/DefaultSendEntryPointComponent.kt rename to features/send/impl/src/main/java/com/tangem/features/send/entrypoint/DefaultSendEntryPointComponent.kt index 9e41df2a03..020cb7a708 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/entrypoint/DefaultSendEntryPointComponent.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/entrypoint/DefaultSendEntryPointComponent.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.entrypoint +package com.tangem.features.send.entrypoint import androidx.compose.foundation.gestures.Orientation import androidx.compose.foundation.layout.fillMaxSize @@ -24,11 +24,11 @@ import com.tangem.core.decompose.model.getOrCreateModel import com.tangem.core.decompose.navigation.inner.InnerRouter import com.tangem.core.ui.decompose.ComposableContentComponent import com.tangem.features.managetokens.component.ChooseManagedTokensComponent -import com.tangem.features.send.v2.api.SendComponent -import com.tangem.features.send.v2.api.SendEntryPointComponent -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents -import com.tangem.features.send.v2.api.entry.SendEntryRoute -import com.tangem.features.send.v2.entrypoint.model.SendEntryPointModel +import com.tangem.features.send.api.SendComponent +import com.tangem.features.send.api.SendEntryPointComponent +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents +import com.tangem.features.send.api.entry.SendEntryRoute +import com.tangem.features.send.entrypoint.model.SendEntryPointModel import com.tangem.features.swap.v2.api.SendWithSwapComponent import dagger.assisted.Assisted import dagger.assisted.AssistedFactory diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/entrypoint/di/SendEntryPointModule.kt b/features/send/impl/src/main/java/com/tangem/features/send/entrypoint/di/SendEntryPointModule.kt similarity index 79% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/entrypoint/di/SendEntryPointModule.kt rename to features/send/impl/src/main/java/com/tangem/features/send/entrypoint/di/SendEntryPointModule.kt index e44f39adfd..109f18cdc0 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/entrypoint/di/SendEntryPointModule.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/entrypoint/di/SendEntryPointModule.kt @@ -1,8 +1,8 @@ -package com.tangem.features.send.v2.entrypoint.di +package com.tangem.features.send.entrypoint.di import com.tangem.core.decompose.di.ModelComponent import com.tangem.core.decompose.model.Model -import com.tangem.features.send.v2.entrypoint.model.SendEntryPointModel +import com.tangem.features.send.entrypoint.model.SendEntryPointModel import dagger.Binds import dagger.Module import dagger.hilt.InstallIn diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/entrypoint/model/SendEntryPointModel.kt b/features/send/impl/src/main/java/com/tangem/features/send/entrypoint/model/SendEntryPointModel.kt similarity index 91% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/entrypoint/model/SendEntryPointModel.kt rename to features/send/impl/src/main/java/com/tangem/features/send/entrypoint/model/SendEntryPointModel.kt index f3ff4ee117..0572ea6bd3 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/entrypoint/model/SendEntryPointModel.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/entrypoint/model/SendEntryPointModel.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.entrypoint.model +package com.tangem.features.send.entrypoint.model import com.tangem.common.ui.notifications.NotificationId import com.tangem.core.analytics.api.AnalyticsEventHandler @@ -7,10 +7,10 @@ import com.tangem.core.decompose.model.Model import com.tangem.core.decompose.navigation.Router import com.tangem.domain.notifications.ShouldShowNotificationUseCase import com.tangem.features.managetokens.component.ChooseManagedTokensComponent -import com.tangem.features.send.v2.api.SendComponent -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents -import com.tangem.features.send.v2.api.entry.SendEntryRoute -import com.tangem.features.send.v2.subcomponents.amount.SendAmountUpdateTrigger +import com.tangem.features.send.api.SendComponent +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents +import com.tangem.features.send.api.entry.SendEntryRoute +import com.tangem.features.send.subcomponents.amount.SendAmountUpdateTrigger import com.tangem.features.swap.v2.api.SendWithSwapComponent import com.tangem.features.swap.v2.api.subcomponents.SwapAmountUpdateTrigger import com.tangem.utils.coroutines.CoroutineDispatcherProvider diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/DefaultFeeSelectorBlockComponent.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/DefaultFeeSelectorBlockComponent.kt similarity index 90% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/DefaultFeeSelectorBlockComponent.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/DefaultFeeSelectorBlockComponent.kt index 9cba99909c..7c659cabe7 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/DefaultFeeSelectorBlockComponent.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/DefaultFeeSelectorBlockComponent.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.feeselector +package com.tangem.features.send.feeselector import androidx.compose.foundation.clickable import androidx.compose.runtime.Composable @@ -12,12 +12,12 @@ import com.tangem.core.decompose.context.AppComponentContext import com.tangem.core.decompose.context.childByContext import com.tangem.core.decompose.model.getOrCreateModel import com.tangem.core.ui.extensions.conditional -import com.tangem.features.send.v2.api.FeeSelectorBlockComponent -import com.tangem.features.send.v2.api.FeeSelectorComponent -import com.tangem.features.send.v2.api.entity.FeeSelectorUM -import com.tangem.features.send.v2.api.params.FeeSelectorParams -import com.tangem.features.send.v2.feeselector.model.FeeSelectorBlockModel -import com.tangem.features.send.v2.feeselector.ui.FeeSelectorBlockContent +import com.tangem.features.send.api.FeeSelectorBlockComponent +import com.tangem.features.send.api.FeeSelectorComponent +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.api.params.FeeSelectorParams +import com.tangem.features.send.feeselector.model.FeeSelectorBlockModel +import com.tangem.features.send.feeselector.ui.FeeSelectorBlockContent import com.tangem.utils.extensions.isSingleItem import dagger.assisted.Assisted import dagger.assisted.AssistedFactory diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/DefaultFeeSelectorComponent.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/DefaultFeeSelectorComponent.kt similarity index 84% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/DefaultFeeSelectorComponent.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/DefaultFeeSelectorComponent.kt index 7966f36ffc..83f48ddc42 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/DefaultFeeSelectorComponent.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/DefaultFeeSelectorComponent.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.feeselector +package com.tangem.features.send.feeselector import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue @@ -12,15 +12,15 @@ import com.tangem.core.decompose.context.childByContext import com.tangem.core.decompose.model.getOrCreateModel import com.tangem.core.decompose.navigation.inner.InnerRouter import com.tangem.core.ui.decompose.ComposableContentComponent -import com.tangem.features.send.v2.api.FeeSelectorComponent -import com.tangem.features.send.v2.api.params.FeeSelectorParams -import com.tangem.features.send.v2.feeselector.component.FeeSelectorComponentParams -import com.tangem.features.send.v2.feeselector.component.extended.FeeExtendedSelectorComponent -import com.tangem.features.send.v2.feeselector.component.speed.FeeSpeedSelectorComponent -import com.tangem.features.send.v2.feeselector.component.token.FeeTokenSelectorComponent -import com.tangem.features.send.v2.feeselector.model.FeeSelectorModel -import com.tangem.features.send.v2.feeselector.route.FeeSelectorRoute -import com.tangem.features.send.v2.feeselector.ui.FeeSelectorModalBottomSheet +import com.tangem.features.send.api.FeeSelectorComponent +import com.tangem.features.send.api.params.FeeSelectorParams +import com.tangem.features.send.feeselector.component.FeeSelectorComponentParams +import com.tangem.features.send.feeselector.component.extended.FeeExtendedSelectorComponent +import com.tangem.features.send.feeselector.component.speed.FeeSpeedSelectorComponent +import com.tangem.features.send.feeselector.component.token.FeeTokenSelectorComponent +import com.tangem.features.send.feeselector.model.FeeSelectorModel +import com.tangem.features.send.feeselector.route.FeeSelectorRoute +import com.tangem.features.send.feeselector.ui.FeeSelectorModalBottomSheet import dagger.assisted.Assisted import dagger.assisted.AssistedFactory import dagger.assisted.AssistedInject diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/DefaultFeeSelectorReloadTrigger.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/DefaultFeeSelectorReloadTrigger.kt similarity index 69% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/DefaultFeeSelectorReloadTrigger.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/DefaultFeeSelectorReloadTrigger.kt index 6d082b2615..6e022d4946 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/DefaultFeeSelectorReloadTrigger.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/DefaultFeeSelectorReloadTrigger.kt @@ -1,10 +1,10 @@ -package com.tangem.features.send.v2.feeselector +package com.tangem.features.send.feeselector -import com.tangem.features.send.v2.api.subcomponents.feeSelector.FeeSelectorCheckReloadListener -import com.tangem.features.send.v2.api.subcomponents.feeSelector.FeeSelectorCheckReloadTrigger -import com.tangem.features.send.v2.api.subcomponents.feeSelector.FeeSelectorReloadListener -import com.tangem.features.send.v2.api.subcomponents.feeSelector.FeeSelectorReloadTrigger -import com.tangem.features.send.v2.api.subcomponents.feeSelector.entity.FeeSelectorData +import com.tangem.features.send.api.subcomponents.feeSelector.FeeSelectorCheckReloadListener +import com.tangem.features.send.api.subcomponents.feeSelector.FeeSelectorCheckReloadTrigger +import com.tangem.features.send.api.subcomponents.feeSelector.FeeSelectorReloadListener +import com.tangem.features.send.api.subcomponents.feeSelector.FeeSelectorReloadTrigger +import com.tangem.features.send.api.subcomponents.feeSelector.entity.FeeSelectorData import kotlinx.coroutines.flow.MutableSharedFlow import kotlinx.coroutines.flow.SharedFlow import javax.inject.Inject diff --git a/features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/FeeSelectorComponentParams.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/FeeSelectorComponentParams.kt new file mode 100644 index 0000000000..c3d08ae74a --- /dev/null +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/FeeSelectorComponentParams.kt @@ -0,0 +1,12 @@ +package com.tangem.features.send.feeselector.component + +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.api.params.FeeSelectorParams +import com.tangem.features.send.feeselector.model.FeeSelectorIntents +import kotlinx.coroutines.flow.MutableStateFlow + +internal class FeeSelectorComponentParams( + val parentParams: FeeSelectorParams.FeeSelectorDetailsParams, + val state: MutableStateFlow, + val intents: FeeSelectorIntents, +) \ No newline at end of file diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/extended/FeeExtendedSelectorComponent.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/extended/FeeExtendedSelectorComponent.kt similarity index 79% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/extended/FeeExtendedSelectorComponent.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/extended/FeeExtendedSelectorComponent.kt index 42f403fe05..f5e366b5d2 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/extended/FeeExtendedSelectorComponent.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/extended/FeeExtendedSelectorComponent.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.feeselector.component.extended +package com.tangem.features.send.feeselector.component.extended import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue @@ -7,9 +7,9 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle import com.tangem.core.decompose.context.AppComponentContext import com.tangem.core.decompose.model.getOrCreateModel import com.tangem.core.ui.decompose.ComposableContentComponent -import com.tangem.features.send.v2.feeselector.component.FeeSelectorComponentParams -import com.tangem.features.send.v2.feeselector.component.extended.model.FeeExtendedSelectorModel -import com.tangem.features.send.v2.feeselector.component.extended.ui.FeeExtendedSelectorContent +import com.tangem.features.send.feeselector.component.FeeSelectorComponentParams +import com.tangem.features.send.feeselector.component.extended.model.FeeExtendedSelectorModel +import com.tangem.features.send.feeselector.component.extended.ui.FeeExtendedSelectorContent import dagger.assisted.Assisted import dagger.assisted.AssistedFactory import dagger.assisted.AssistedInject diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/extended/entity/FeeExtendedSelectorUM.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/extended/entity/FeeExtendedSelectorUM.kt similarity index 59% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/extended/entity/FeeExtendedSelectorUM.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/extended/entity/FeeExtendedSelectorUM.kt index a9406c3f73..b9d3ec3795 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/extended/entity/FeeExtendedSelectorUM.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/extended/entity/FeeExtendedSelectorUM.kt @@ -1,9 +1,9 @@ -package com.tangem.features.send.v2.feeselector.component.extended.entity +package com.tangem.features.send.feeselector.component.extended.entity import androidx.compose.runtime.Immutable import com.tangem.core.ui.components.token.state.TokenItemState -import com.tangem.features.send.v2.api.entity.FeeItem -import com.tangem.features.send.v2.api.entity.FeeSelectorUM +import com.tangem.features.send.api.entity.FeeItem +import com.tangem.features.send.api.entity.FeeSelectorUM @Immutable data class FeeExtendedSelectorUM( diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/extended/model/FeeExtendedSelectorModel.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/extended/model/FeeExtendedSelectorModel.kt similarity index 86% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/extended/model/FeeExtendedSelectorModel.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/extended/model/FeeExtendedSelectorModel.kt index 6c56801a3b..65a0fb932e 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/extended/model/FeeExtendedSelectorModel.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/extended/model/FeeExtendedSelectorModel.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.feeselector.component.extended.model +package com.tangem.features.send.feeselector.component.extended.model import androidx.compose.runtime.Stable import arrow.core.getOrElse @@ -8,10 +8,10 @@ import com.tangem.core.decompose.model.ParamsContainer import com.tangem.core.decompose.navigation.Router import com.tangem.domain.appcurrency.GetSelectedAppCurrencyUseCase import com.tangem.domain.appcurrency.model.AppCurrency -import com.tangem.features.send.v2.api.entity.FeeSelectorUM -import com.tangem.features.send.v2.feeselector.component.FeeSelectorComponentParams -import com.tangem.features.send.v2.feeselector.component.extended.entity.FeeExtendedSelectorUM -import com.tangem.features.send.v2.feeselector.route.FeeSelectorRoute +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.feeselector.component.FeeSelectorComponentParams +import com.tangem.features.send.feeselector.component.extended.entity.FeeExtendedSelectorUM +import com.tangem.features.send.feeselector.route.FeeSelectorRoute import com.tangem.utils.Provider import com.tangem.utils.coroutines.CoroutineDispatcherProvider import kotlinx.coroutines.flow.* diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/extended/model/SelectedTokenItemConverter.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/extended/model/SelectedTokenItemConverter.kt similarity index 95% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/extended/model/SelectedTokenItemConverter.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/extended/model/SelectedTokenItemConverter.kt index 070c1895a1..407333c173 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/extended/model/SelectedTokenItemConverter.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/extended/model/SelectedTokenItemConverter.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.feeselector.component.extended.model +package com.tangem.features.send.feeselector.component.extended.model import com.tangem.common.ui.tokens.TokenItemStateConverter import com.tangem.core.ui.components.icons.IconTint @@ -9,7 +9,7 @@ import com.tangem.core.ui.format.bigdecimal.fiat import com.tangem.core.ui.format.bigdecimal.format import com.tangem.domain.appcurrency.model.AppCurrency import com.tangem.domain.models.currency.CryptoCurrencyStatus -import com.tangem.features.send.v2.impl.R +import com.tangem.features.send.impl.R import com.tangem.utils.Provider import com.tangem.utils.converter.Converter diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/extended/ui/FeeExtendedSelectorContent.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/extended/ui/FeeExtendedSelectorContent.kt similarity index 93% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/extended/ui/FeeExtendedSelectorContent.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/extended/ui/FeeExtendedSelectorContent.kt index 9e1f4c23df..a9c2c36ea4 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/extended/ui/FeeExtendedSelectorContent.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/extended/ui/FeeExtendedSelectorContent.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.feeselector.component.extended.ui +package com.tangem.features.send.feeselector.component.extended.ui import androidx.compose.foundation.background import androidx.compose.foundation.clickable @@ -33,9 +33,13 @@ import com.tangem.domain.appcurrency.model.AppCurrency import com.tangem.domain.models.currency.CryptoCurrency import com.tangem.domain.models.currency.CryptoCurrencyStatus import com.tangem.domain.models.network.Network -import com.tangem.features.send.v2.api.entity.* -import com.tangem.features.send.v2.feeselector.component.extended.entity.FeeExtendedSelectorUM -import com.tangem.features.send.v2.feeselector.component.speed.ui.RegularFeeItemContent +import com.tangem.features.send.api.entity.FeeExtraInfo +import com.tangem.features.send.api.entity.FeeFiatRateUM +import com.tangem.features.send.api.entity.FeeItem +import com.tangem.features.send.api.entity.FeeNonce +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.feeselector.component.extended.entity.FeeExtendedSelectorUM +import com.tangem.features.send.feeselector.component.speed.ui.RegularFeeItemContent import kotlinx.collections.immutable.persistentListOf import java.math.BigDecimal diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/speed/FeeSpeedSelectorComponent.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/speed/FeeSpeedSelectorComponent.kt similarity index 77% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/speed/FeeSpeedSelectorComponent.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/speed/FeeSpeedSelectorComponent.kt index 1735ccd476..92f17a436f 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/speed/FeeSpeedSelectorComponent.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/speed/FeeSpeedSelectorComponent.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.feeselector.component.speed +package com.tangem.features.send.feeselector.component.speed import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue @@ -7,10 +7,10 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle import com.tangem.core.decompose.context.AppComponentContext import com.tangem.core.decompose.model.getOrCreateModel import com.tangem.core.ui.decompose.ComposableContentComponent -import com.tangem.features.send.v2.api.entity.FeeSelectorUM -import com.tangem.features.send.v2.feeselector.component.FeeSelectorComponentParams -import com.tangem.features.send.v2.feeselector.component.speed.model.FeeSpeedSelectorModel -import com.tangem.features.send.v2.feeselector.component.speed.ui.FeeSpeedSelectorContent +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.feeselector.component.FeeSelectorComponentParams +import com.tangem.features.send.feeselector.component.speed.model.FeeSpeedSelectorModel +import com.tangem.features.send.feeselector.component.speed.ui.FeeSpeedSelectorContent import dagger.assisted.Assisted import dagger.assisted.AssistedFactory import dagger.assisted.AssistedInject diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/speed/FeeSpeedSelectorIntents.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/speed/FeeSpeedSelectorIntents.kt similarity index 59% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/speed/FeeSpeedSelectorIntents.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/speed/FeeSpeedSelectorIntents.kt index 13a9fb4477..11d5b4fa11 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/speed/FeeSpeedSelectorIntents.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/speed/FeeSpeedSelectorIntents.kt @@ -1,8 +1,8 @@ -package com.tangem.features.send.v2.feeselector.component.speed +package com.tangem.features.send.feeselector.component.speed import androidx.compose.runtime.Stable -import com.tangem.features.send.v2.feeselector.model.FeeSelectorIntents -import com.tangem.features.send.v2.feeselector.model.StubFeeSelectorIntents +import com.tangem.features.send.feeselector.model.FeeSelectorIntents +import com.tangem.features.send.feeselector.model.StubFeeSelectorIntents @Stable internal interface FeeSpeedSelectorIntents : FeeSelectorIntents { diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/speed/model/FeeSpeedSelectorModel.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/speed/model/FeeSpeedSelectorModel.kt similarity index 75% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/speed/model/FeeSpeedSelectorModel.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/speed/model/FeeSpeedSelectorModel.kt index 8f42d817fb..cf1d5205d9 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/speed/model/FeeSpeedSelectorModel.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/speed/model/FeeSpeedSelectorModel.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.feeselector.component.speed.model +package com.tangem.features.send.feeselector.component.speed.model import androidx.compose.runtime.Stable import com.tangem.common.TangemBlogUrlBuilder @@ -6,10 +6,10 @@ import com.tangem.core.decompose.di.ModelScoped import com.tangem.core.decompose.model.Model import com.tangem.core.decompose.model.ParamsContainer import com.tangem.core.navigation.url.UrlOpener -import com.tangem.features.send.v2.api.entity.FeeSelectorUM -import com.tangem.features.send.v2.feeselector.component.FeeSelectorComponentParams -import com.tangem.features.send.v2.feeselector.component.speed.FeeSpeedSelectorIntents -import com.tangem.features.send.v2.feeselector.model.FeeSelectorIntents +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.feeselector.component.FeeSelectorComponentParams +import com.tangem.features.send.feeselector.component.speed.FeeSpeedSelectorIntents +import com.tangem.features.send.feeselector.model.FeeSelectorIntents import com.tangem.utils.coroutines.CoroutineDispatcherProvider import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.launch diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/speed/ui/FeeSpeedSelectorContent.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/speed/ui/FeeSpeedSelectorContent.kt similarity index 97% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/speed/ui/FeeSpeedSelectorContent.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/speed/ui/FeeSpeedSelectorContent.kt index 366e500c80..acf86c17b2 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/speed/ui/FeeSpeedSelectorContent.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/speed/ui/FeeSpeedSelectorContent.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.feeselector.component.speed.ui +package com.tangem.features.send.feeselector.component.speed.ui import android.content.res.Configuration import androidx.annotation.DrawableRes @@ -54,10 +54,15 @@ import com.tangem.domain.appcurrency.model.AppCurrency import com.tangem.domain.models.currency.CryptoCurrency import com.tangem.domain.models.currency.CryptoCurrencyStatus import com.tangem.domain.models.network.Network -import com.tangem.features.send.v2.api.entity.* -import com.tangem.features.send.v2.feeselector.component.speed.FeeSpeedSelectorIntents -import com.tangem.features.send.v2.feeselector.component.speed.StubFeeSpeedSelectorIntents -import com.tangem.features.send.v2.impl.R +import com.tangem.features.send.api.entity.CustomFeeFieldUM +import com.tangem.features.send.api.entity.FeeExtraInfo +import com.tangem.features.send.api.entity.FeeFiatRateUM +import com.tangem.features.send.api.entity.FeeItem +import com.tangem.features.send.api.entity.FeeNonce +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.feeselector.component.speed.FeeSpeedSelectorIntents +import com.tangem.features.send.feeselector.component.speed.StubFeeSpeedSelectorIntents +import com.tangem.features.send.impl.R import com.tangem.utils.StringsSigns import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.persistentListOf diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/token/FeeTokenSelectorComponent.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/token/FeeTokenSelectorComponent.kt similarity index 80% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/token/FeeTokenSelectorComponent.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/token/FeeTokenSelectorComponent.kt index 410e436d41..a7c8f5c308 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/token/FeeTokenSelectorComponent.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/token/FeeTokenSelectorComponent.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.feeselector.component.token +package com.tangem.features.send.feeselector.component.token import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue @@ -7,9 +7,9 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle import com.tangem.core.decompose.context.AppComponentContext import com.tangem.core.decompose.model.getOrCreateModel import com.tangem.core.ui.decompose.ComposableContentComponent -import com.tangem.features.send.v2.feeselector.component.FeeSelectorComponentParams -import com.tangem.features.send.v2.feeselector.component.token.model.FeeTokenSelectorModel -import com.tangem.features.send.v2.feeselector.component.token.ui.FeeTokenSelectorContent +import com.tangem.features.send.feeselector.component.FeeSelectorComponentParams +import com.tangem.features.send.feeselector.component.token.model.FeeTokenSelectorModel +import com.tangem.features.send.feeselector.component.token.ui.FeeTokenSelectorContent import dagger.assisted.Assisted import dagger.assisted.AssistedFactory import dagger.assisted.AssistedInject diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/token/FeeTokenSelectorIntents.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/token/FeeTokenSelectorIntents.kt similarity index 59% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/token/FeeTokenSelectorIntents.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/token/FeeTokenSelectorIntents.kt index 7e9e5b99c6..b5785583e3 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/token/FeeTokenSelectorIntents.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/token/FeeTokenSelectorIntents.kt @@ -1,8 +1,8 @@ -package com.tangem.features.send.v2.feeselector.component.token +package com.tangem.features.send.feeselector.component.token import androidx.compose.runtime.Stable -import com.tangem.features.send.v2.feeselector.model.FeeSelectorIntents -import com.tangem.features.send.v2.feeselector.model.StubFeeSelectorIntents +import com.tangem.features.send.feeselector.model.FeeSelectorIntents +import com.tangem.features.send.feeselector.model.StubFeeSelectorIntents @Stable internal interface FeeTokenSelectorIntents : FeeSelectorIntents { diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/token/entity/FeeTokenItemState.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/token/entity/FeeTokenItemState.kt similarity index 71% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/token/entity/FeeTokenItemState.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/token/entity/FeeTokenItemState.kt index ffc1e2e2d0..473c198bc3 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/token/entity/FeeTokenItemState.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/token/entity/FeeTokenItemState.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.feeselector.component.token.entity +package com.tangem.features.send.feeselector.component.token.entity import com.tangem.core.ui.components.token.state.TokenItemState diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/token/entity/FeeTokenSelectorUM.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/token/entity/FeeTokenSelectorUM.kt similarity index 63% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/token/entity/FeeTokenSelectorUM.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/token/entity/FeeTokenSelectorUM.kt index e1fb00d6af..eda8e96501 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/token/entity/FeeTokenSelectorUM.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/token/entity/FeeTokenSelectorUM.kt @@ -1,6 +1,6 @@ -package com.tangem.features.send.v2.feeselector.component.token.entity +package com.tangem.features.send.feeselector.component.token.entity -import com.tangem.features.send.v2.api.entity.FeeSelectorUM +import com.tangem.features.send.api.entity.FeeSelectorUM import kotlinx.collections.immutable.ImmutableList internal data class FeeTokenSelectorUM( diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/token/model/FeeTokenForListConverter.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/token/model/FeeTokenForListConverter.kt similarity index 92% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/token/model/FeeTokenForListConverter.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/token/model/FeeTokenForListConverter.kt index bcf449a9d1..79154f1d67 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/token/model/FeeTokenForListConverter.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/token/model/FeeTokenForListConverter.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.feeselector.component.token.model +package com.tangem.features.send.feeselector.component.token.model import com.tangem.common.ui.tokens.TokenItemStateConverter import com.tangem.core.ui.components.token.state.TokenItemState @@ -8,8 +8,8 @@ import com.tangem.core.ui.format.bigdecimal.fiat import com.tangem.core.ui.format.bigdecimal.format import com.tangem.domain.appcurrency.model.AppCurrency import com.tangem.domain.models.currency.CryptoCurrencyStatus -import com.tangem.features.send.v2.feeselector.component.token.entity.FeeTokenItemState -import com.tangem.features.send.v2.impl.R +import com.tangem.features.send.feeselector.component.token.entity.FeeTokenItemState +import com.tangem.features.send.impl.R import com.tangem.utils.Provider import com.tangem.utils.converter.Converter import com.tangem.utils.extensions.isZero diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/token/model/FeeTokenSelectorModel.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/token/model/FeeTokenSelectorModel.kt similarity index 85% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/token/model/FeeTokenSelectorModel.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/token/model/FeeTokenSelectorModel.kt index 2385981d76..74412b11e3 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/token/model/FeeTokenSelectorModel.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/token/model/FeeTokenSelectorModel.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.feeselector.component.token.model +package com.tangem.features.send.feeselector.component.token.model import androidx.compose.runtime.Stable import arrow.core.getOrElse @@ -10,12 +10,12 @@ import com.tangem.core.navigation.url.UrlOpener import com.tangem.domain.appcurrency.GetSelectedAppCurrencyUseCase import com.tangem.domain.appcurrency.model.AppCurrency import com.tangem.domain.models.currency.CryptoCurrencyStatus -import com.tangem.features.send.v2.api.entity.FeeSelectorUM -import com.tangem.features.send.v2.feeselector.component.FeeSelectorComponentParams -import com.tangem.features.send.v2.feeselector.component.token.FeeTokenSelectorIntents -import com.tangem.features.send.v2.feeselector.component.token.entity.FeeTokenItemState -import com.tangem.features.send.v2.feeselector.component.token.entity.FeeTokenSelectorUM -import com.tangem.features.send.v2.feeselector.model.FeeSelectorIntents +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.feeselector.component.FeeSelectorComponentParams +import com.tangem.features.send.feeselector.component.token.FeeTokenSelectorIntents +import com.tangem.features.send.feeselector.component.token.entity.FeeTokenItemState +import com.tangem.features.send.feeselector.component.token.entity.FeeTokenSelectorUM +import com.tangem.features.send.feeselector.model.FeeSelectorIntents import com.tangem.utils.Provider import com.tangem.utils.coroutines.CoroutineDispatcherProvider import kotlinx.collections.immutable.persistentListOf diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/token/ui/FeeTokenSelectorContent.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/token/ui/FeeTokenSelectorContent.kt similarity index 93% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/token/ui/FeeTokenSelectorContent.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/token/ui/FeeTokenSelectorContent.kt index 7a57435e0e..ea55af5078 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/component/token/ui/FeeTokenSelectorContent.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/component/token/ui/FeeTokenSelectorContent.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.feeselector.component.token.ui +package com.tangem.features.send.feeselector.component.token.ui import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement @@ -36,12 +36,16 @@ import com.tangem.domain.appcurrency.model.AppCurrency import com.tangem.domain.models.currency.CryptoCurrency import com.tangem.domain.models.currency.CryptoCurrencyStatus import com.tangem.domain.models.network.Network -import com.tangem.features.send.v2.api.entity.* -import com.tangem.features.send.v2.feeselector.component.token.FeeTokenSelectorIntents -import com.tangem.features.send.v2.feeselector.component.token.StubFeeTokenSelectorIntents -import com.tangem.features.send.v2.feeselector.component.token.entity.FeeTokenItemState -import com.tangem.features.send.v2.feeselector.component.token.entity.FeeTokenSelectorUM -import com.tangem.features.send.v2.impl.R +import com.tangem.features.send.api.entity.FeeExtraInfo +import com.tangem.features.send.api.entity.FeeFiatRateUM +import com.tangem.features.send.api.entity.FeeItem +import com.tangem.features.send.api.entity.FeeNonce +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.feeselector.component.token.FeeTokenSelectorIntents +import com.tangem.features.send.feeselector.component.token.StubFeeTokenSelectorIntents +import com.tangem.features.send.feeselector.component.token.entity.FeeTokenItemState +import com.tangem.features.send.feeselector.component.token.entity.FeeTokenSelectorUM +import com.tangem.features.send.impl.R import com.tangem.utils.StringsSigns import kotlinx.collections.immutable.persistentListOf import kotlinx.collections.immutable.toImmutableList diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/di/FeeSelectorFeatureModule.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/di/FeeSelectorFeatureModule.kt similarity index 57% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/di/FeeSelectorFeatureModule.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/di/FeeSelectorFeatureModule.kt index 0c86e54455..dbe05e5489 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/di/FeeSelectorFeatureModule.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/di/FeeSelectorFeatureModule.kt @@ -1,14 +1,14 @@ -package com.tangem.features.send.v2.feeselector.di +package com.tangem.features.send.feeselector.di -import com.tangem.features.send.v2.api.FeeSelectorBlockComponent -import com.tangem.features.send.v2.api.FeeSelectorComponent -import com.tangem.features.send.v2.api.subcomponents.feeSelector.FeeSelectorCheckReloadListener -import com.tangem.features.send.v2.api.subcomponents.feeSelector.FeeSelectorCheckReloadTrigger -import com.tangem.features.send.v2.api.subcomponents.feeSelector.FeeSelectorReloadListener -import com.tangem.features.send.v2.api.subcomponents.feeSelector.FeeSelectorReloadTrigger -import com.tangem.features.send.v2.feeselector.DefaultFeeSelectorBlockComponent -import com.tangem.features.send.v2.feeselector.DefaultFeeSelectorComponent -import com.tangem.features.send.v2.feeselector.DefaultFeeSelectorReloadTrigger +import com.tangem.features.send.api.FeeSelectorBlockComponent +import com.tangem.features.send.api.FeeSelectorComponent +import com.tangem.features.send.api.subcomponents.feeSelector.FeeSelectorCheckReloadListener +import com.tangem.features.send.api.subcomponents.feeSelector.FeeSelectorCheckReloadTrigger +import com.tangem.features.send.api.subcomponents.feeSelector.FeeSelectorReloadListener +import com.tangem.features.send.api.subcomponents.feeSelector.FeeSelectorReloadTrigger +import com.tangem.features.send.feeselector.DefaultFeeSelectorBlockComponent +import com.tangem.features.send.feeselector.DefaultFeeSelectorComponent +import com.tangem.features.send.feeselector.DefaultFeeSelectorReloadTrigger import dagger.Binds import dagger.Module import dagger.hilt.InstallIn diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/di/FeeSelectorModelModule.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/di/FeeSelectorModelModule.kt similarity index 67% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/di/FeeSelectorModelModule.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/di/FeeSelectorModelModule.kt index 1891f991d3..85c6336fc6 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/di/FeeSelectorModelModule.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/di/FeeSelectorModelModule.kt @@ -1,12 +1,12 @@ -package com.tangem.features.send.v2.feeselector.di +package com.tangem.features.send.feeselector.di import com.tangem.core.decompose.di.ModelComponent import com.tangem.core.decompose.model.Model -import com.tangem.features.send.v2.feeselector.component.extended.model.FeeExtendedSelectorModel -import com.tangem.features.send.v2.feeselector.model.FeeSelectorBlockModel -import com.tangem.features.send.v2.feeselector.component.speed.model.FeeSpeedSelectorModel -import com.tangem.features.send.v2.feeselector.component.token.model.FeeTokenSelectorModel -import com.tangem.features.send.v2.feeselector.model.FeeSelectorModel +import com.tangem.features.send.feeselector.component.extended.model.FeeExtendedSelectorModel +import com.tangem.features.send.feeselector.component.speed.model.FeeSpeedSelectorModel +import com.tangem.features.send.feeselector.component.token.model.FeeTokenSelectorModel +import com.tangem.features.send.feeselector.model.FeeSelectorBlockModel +import com.tangem.features.send.feeselector.model.FeeSelectorModel import dagger.Binds import dagger.Module import dagger.hilt.InstallIn diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/FeeSelectorAlertFactory.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/FeeSelectorAlertFactory.kt similarity index 94% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/FeeSelectorAlertFactory.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/FeeSelectorAlertFactory.kt index 96a8476eef..3f4a77ef8f 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/FeeSelectorAlertFactory.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/FeeSelectorAlertFactory.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.feeselector.model +package com.tangem.features.send.feeselector.model import com.tangem.blockchain.common.transaction.TransactionFee import com.tangem.core.decompose.di.ModelScoped @@ -7,10 +7,10 @@ import com.tangem.core.ui.extensions.resourceReference import com.tangem.core.ui.extensions.wrappedList import com.tangem.core.ui.message.DialogMessage import com.tangem.core.ui.message.EventMessageAction -import com.tangem.features.send.v2.api.entity.FeeItem -import com.tangem.features.send.v2.api.entity.FeeSelectorUM -import com.tangem.features.send.v2.api.subcomponents.feeSelector.utils.FeeCalculationUtils -import com.tangem.features.send.v2.impl.R +import com.tangem.features.send.api.entity.FeeItem +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.api.subcomponents.feeSelector.utils.FeeCalculationUtils +import com.tangem.features.send.impl.R import java.math.BigDecimal import javax.inject.Inject diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/FeeSelectorBlockModel.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/FeeSelectorBlockModel.kt similarity index 85% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/FeeSelectorBlockModel.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/FeeSelectorBlockModel.kt index 05abb78df9..4a6cd83145 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/FeeSelectorBlockModel.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/FeeSelectorBlockModel.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.feeselector.model +package com.tangem.features.send.feeselector.model import androidx.compose.runtime.Stable import com.arkivanov.decompose.router.slot.SlotNavigation @@ -11,11 +11,11 @@ import com.tangem.core.decompose.model.Model import com.tangem.core.decompose.model.ParamsContainer import com.tangem.core.navigation.url.UrlOpener import com.tangem.domain.settings.NeverShowTapHelpUseCase -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents.SendScreenSource -import com.tangem.features.send.v2.api.callbacks.FeeSelectorModelCallback -import com.tangem.features.send.v2.api.entity.FeeSelectorUM -import com.tangem.features.send.v2.api.params.FeeSelectorParams +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents.SendScreenSource +import com.tangem.features.send.api.callbacks.FeeSelectorModelCallback +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.api.params.FeeSelectorParams import com.tangem.utils.coroutines.CoroutineDispatcherProvider import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.launch diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/FeeSelectorIntents.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/FeeSelectorIntents.kt similarity index 86% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/FeeSelectorIntents.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/FeeSelectorIntents.kt index ebb0c7a91b..91b38c7ea4 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/FeeSelectorIntents.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/FeeSelectorIntents.kt @@ -1,8 +1,8 @@ -package com.tangem.features.send.v2.feeselector.model +package com.tangem.features.send.feeselector.model import androidx.compose.runtime.Stable import com.tangem.domain.models.currency.CryptoCurrencyStatus -import com.tangem.features.send.v2.api.entity.FeeItem +import com.tangem.features.send.api.entity.FeeItem @Stable internal interface FeeSelectorIntents { diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/FeeSelectorLogic.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/FeeSelectorLogic.kt similarity index 89% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/FeeSelectorLogic.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/FeeSelectorLogic.kt index 5e0a7deecb..b7f6258ee8 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/FeeSelectorLogic.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/FeeSelectorLogic.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.feeselector.model +package com.tangem.features.send.feeselector.model import arrow.core.Either import arrow.core.flatMap @@ -20,17 +20,24 @@ import com.tangem.domain.transaction.usecase.IsFeeApproximateUseCase import com.tangem.domain.transaction.usecase.gasless.GetAvailableFeeTokensUseCase import com.tangem.domain.transaction.usecase.gasless.IsGaslessFeeSupportedForNetwork import com.tangem.domain.wallets.usecase.GetUserWalletUseCase -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents.NonceInserted -import com.tangem.features.send.v2.api.entity.FeeItem -import com.tangem.features.send.v2.api.entity.FeeNonce -import com.tangem.features.send.v2.api.entity.FeeSelectorUM -import com.tangem.features.send.v2.api.params.FeeSelectorParams -import com.tangem.features.send.v2.api.subcomponents.feeSelector.FeeSelectorCheckReloadListener -import com.tangem.features.send.v2.api.subcomponents.feeSelector.FeeSelectorCheckReloadTrigger -import com.tangem.features.send.v2.api.subcomponents.feeSelector.FeeSelectorReloadListener -import com.tangem.features.send.v2.api.subcomponents.feeSelector.analytics.CommonSendFeeAnalyticEvents -import com.tangem.features.send.v2.api.subcomponents.feeSelector.analytics.CommonSendFeeAnalyticEvents.GasPriceInserter -import com.tangem.features.send.v2.feeselector.model.transformers.* +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents.NonceInserted +import com.tangem.features.send.api.entity.FeeItem +import com.tangem.features.send.api.entity.FeeNonce +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.api.params.FeeSelectorParams +import com.tangem.features.send.api.subcomponents.feeSelector.FeeSelectorCheckReloadListener +import com.tangem.features.send.api.subcomponents.feeSelector.FeeSelectorCheckReloadTrigger +import com.tangem.features.send.api.subcomponents.feeSelector.FeeSelectorReloadListener +import com.tangem.features.send.api.subcomponents.feeSelector.analytics.CommonSendFeeAnalyticEvents +import com.tangem.features.send.api.subcomponents.feeSelector.analytics.CommonSendFeeAnalyticEvents.GasPriceInserter +import com.tangem.features.send.feeselector.model.transformers.FeeItemSelectedTransformer +import com.tangem.features.send.feeselector.model.transformers.FeeSelectorCustomValueChangedTransformer +import com.tangem.features.send.feeselector.model.transformers.FeeSelectorErrorTransformer +import com.tangem.features.send.feeselector.model.transformers.FeeSelectorLoadedTransformer +import com.tangem.features.send.feeselector.model.transformers.FeeSelectorLoadingTransformer +import com.tangem.features.send.feeselector.model.transformers.FeeSelectorNonceChangeTransformer +import com.tangem.features.send.feeselector.model.transformers.FeeSelectorRemoveSuggestedTransformer +import com.tangem.features.send.feeselector.model.transformers.FeeSelectorTokenSelectedTransformer import com.tangem.utils.coroutines.JobHolder import com.tangem.utils.coroutines.saveIn import com.tangem.utils.transformer.update diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/FeeSelectorModel.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/FeeSelectorModel.kt similarity index 92% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/FeeSelectorModel.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/FeeSelectorModel.kt index 91861c714a..548b0d7cb2 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/FeeSelectorModel.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/FeeSelectorModel.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.feeselector.model +package com.tangem.features.send.feeselector.model import androidx.compose.runtime.Stable import com.arkivanov.decompose.router.stack.StackNavigation @@ -9,11 +9,11 @@ import com.tangem.core.decompose.model.Model import com.tangem.core.decompose.model.ParamsContainer import com.tangem.core.decompose.utils.stack import com.tangem.domain.models.currency.CryptoCurrencyStatus -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents -import com.tangem.features.send.v2.api.entity.FeeItem -import com.tangem.features.send.v2.api.entity.FeeSelectorUM -import com.tangem.features.send.v2.api.params.FeeSelectorParams -import com.tangem.features.send.v2.feeselector.route.FeeSelectorRoute +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents +import com.tangem.features.send.api.entity.FeeItem +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.api.params.FeeSelectorParams +import com.tangem.features.send.feeselector.route.FeeSelectorRoute import com.tangem.utils.coroutines.CoroutineDispatcherProvider import com.tangem.utils.extensions.isSingleItem import kotlinx.coroutines.launch diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeItemConverter.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/transformers/FeeItemConverter.kt similarity index 93% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeItemConverter.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/transformers/FeeItemConverter.kt index a2c55aa0de..c448124c08 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeItemConverter.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/transformers/FeeItemConverter.kt @@ -1,12 +1,12 @@ -package com.tangem.features.send.v2.feeselector.model.transformers +package com.tangem.features.send.feeselector.model.transformers import com.tangem.blockchain.common.transaction.Fee import com.tangem.blockchain.common.transaction.TransactionFee import com.tangem.domain.appcurrency.model.AppCurrency import com.tangem.domain.models.currency.CryptoCurrencyStatus -import com.tangem.features.send.v2.api.entity.FeeItem -import com.tangem.features.send.v2.api.params.FeeSelectorParams -import com.tangem.features.send.v2.feeselector.model.FeeSelectorIntents +import com.tangem.features.send.api.entity.FeeItem +import com.tangem.features.send.api.params.FeeSelectorParams +import com.tangem.features.send.feeselector.model.FeeSelectorIntents import com.tangem.utils.converter.Converter import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.toImmutableList diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeItemSelectedTransformer.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/transformers/FeeItemSelectedTransformer.kt similarity index 67% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeItemSelectedTransformer.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/transformers/FeeItemSelectedTransformer.kt index dee3471c75..ae47af1087 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeItemSelectedTransformer.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/transformers/FeeItemSelectedTransformer.kt @@ -1,7 +1,7 @@ -package com.tangem.features.send.v2.feeselector.model.transformers +package com.tangem.features.send.feeselector.model.transformers -import com.tangem.features.send.v2.api.entity.FeeItem -import com.tangem.features.send.v2.api.entity.FeeSelectorUM +import com.tangem.features.send.api.entity.FeeItem +import com.tangem.features.send.api.entity.FeeSelectorUM import com.tangem.utils.transformer.Transformer internal class FeeItemSelectedTransformer(private val selectedFeeItem: FeeItem) : Transformer { diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeSelectorCustomFieldConverter.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/transformers/FeeSelectorCustomFieldConverter.kt similarity index 88% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeSelectorCustomFieldConverter.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/transformers/FeeSelectorCustomFieldConverter.kt index 344bb80387..ffbbeb9d55 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeSelectorCustomFieldConverter.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/transformers/FeeSelectorCustomFieldConverter.kt @@ -1,16 +1,16 @@ -package com.tangem.features.send.v2.feeselector.model.transformers +package com.tangem.features.send.feeselector.model.transformers import com.tangem.blockchain.common.transaction.Fee import com.tangem.blockchain.common.transaction.TransactionFee import com.tangem.core.ui.utils.parseToBigDecimal import com.tangem.domain.appcurrency.model.AppCurrency import com.tangem.domain.models.currency.CryptoCurrencyStatus -import com.tangem.features.send.v2.api.entity.CustomFeeFieldUM -import com.tangem.features.send.v2.api.entity.FeeSelectorUM -import com.tangem.features.send.v2.feeselector.model.FeeSelectorIntents -import com.tangem.features.send.v2.subcomponents.fee.model.converters.custom.bitcoin.BitcoinCustomFeeConverter -import com.tangem.features.send.v2.subcomponents.fee.model.converters.custom.ethereum.EthereumCustomFeeConverter -import com.tangem.features.send.v2.subcomponents.fee.model.converters.custom.kaspa.KaspaCustomFeeConverter +import com.tangem.features.send.api.entity.CustomFeeFieldUM +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.feeselector.model.FeeSelectorIntents +import com.tangem.features.send.subcomponents.fee.model.converters.custom.bitcoin.BitcoinCustomFeeConverter +import com.tangem.features.send.subcomponents.fee.model.converters.custom.ethereum.EthereumCustomFeeConverter +import com.tangem.features.send.subcomponents.fee.model.converters.custom.kaspa.KaspaCustomFeeConverter import com.tangem.utils.converter.TwoWayConverter import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.persistentListOf diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeSelectorCustomValueChangedTransformer.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/transformers/FeeSelectorCustomValueChangedTransformer.kt similarity index 88% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeSelectorCustomValueChangedTransformer.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/transformers/FeeSelectorCustomValueChangedTransformer.kt index 5e94e5a7c1..847e634471 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeSelectorCustomValueChangedTransformer.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/transformers/FeeSelectorCustomValueChangedTransformer.kt @@ -1,11 +1,11 @@ -package com.tangem.features.send.v2.feeselector.model.transformers +package com.tangem.features.send.feeselector.model.transformers import com.tangem.core.ui.utils.parseToBigDecimal import com.tangem.domain.appcurrency.model.AppCurrency import com.tangem.domain.models.currency.CryptoCurrencyStatus -import com.tangem.features.send.v2.api.entity.FeeItem -import com.tangem.features.send.v2.api.entity.FeeSelectorUM -import com.tangem.features.send.v2.feeselector.model.FeeSelectorIntents +import com.tangem.features.send.api.entity.FeeItem +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.feeselector.model.FeeSelectorIntents import com.tangem.utils.extensions.isZero import com.tangem.utils.transformer.Transformer import kotlinx.collections.immutable.toImmutableList diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeSelectorErrorTransformer.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/transformers/FeeSelectorErrorTransformer.kt similarity index 83% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeSelectorErrorTransformer.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/transformers/FeeSelectorErrorTransformer.kt index 7cac2f632f..9b6d41ac15 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeSelectorErrorTransformer.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/transformers/FeeSelectorErrorTransformer.kt @@ -1,7 +1,7 @@ -package com.tangem.features.send.v2.feeselector.model.transformers +package com.tangem.features.send.feeselector.model.transformers import com.tangem.domain.transaction.error.GetFeeError -import com.tangem.features.send.v2.api.entity.FeeSelectorUM +import com.tangem.features.send.api.entity.FeeSelectorUM import com.tangem.utils.transformer.Transformer internal class FeeSelectorErrorTransformer(private val error: GetFeeError) : Transformer { diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeSelectorLoadedTransformer.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/transformers/FeeSelectorLoadedTransformer.kt similarity index 83% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeSelectorLoadedTransformer.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/transformers/FeeSelectorLoadedTransformer.kt index 438b833d03..f1b4d6bdf2 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeSelectorLoadedTransformer.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/transformers/FeeSelectorLoadedTransformer.kt @@ -1,13 +1,17 @@ -package com.tangem.features.send.v2.feeselector.model.transformers +package com.tangem.features.send.feeselector.model.transformers import com.tangem.blockchain.common.transaction.Fee import com.tangem.domain.appcurrency.model.AppCurrency import com.tangem.domain.models.currency.CryptoCurrency import com.tangem.domain.models.currency.CryptoCurrencyStatus -import com.tangem.features.send.v2.api.entity.* -import com.tangem.features.send.v2.api.params.FeeSelectorParams -import com.tangem.features.send.v2.feeselector.model.FeeSelectorIntents -import com.tangem.features.send.v2.feeselector.model.FeeSelectorLogic.LoadedFeeResult +import com.tangem.features.send.api.entity.FeeExtraInfo +import com.tangem.features.send.api.entity.FeeFiatRateUM +import com.tangem.features.send.api.entity.FeeItem +import com.tangem.features.send.api.entity.FeeNonce +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.api.params.FeeSelectorParams +import com.tangem.features.send.feeselector.model.FeeSelectorIntents +import com.tangem.features.send.feeselector.model.FeeSelectorLogic import com.tangem.lib.crypto.BlockchainUtils.isTron import com.tangem.utils.transformer.Transformer import kotlinx.collections.immutable.ImmutableList @@ -18,7 +22,7 @@ internal class FeeSelectorLoadedTransformer( private val cryptoCurrencyStatus: CryptoCurrencyStatus, private val feeCryptoCurrencyStatus: CryptoCurrencyStatus, private val appCurrency: AppCurrency, - private val fees: LoadedFeeResult, + private val fees: FeeSelectorLogic.LoadedFeeResult, private val feeStateConfiguration: FeeSelectorParams.FeeStateConfiguration, private val isFeeApproximate: Boolean, private val feeSelectorIntents: FeeSelectorIntents, @@ -70,7 +74,7 @@ internal class FeeSelectorLoadedTransformer( isTron(cryptoCurrencyStatus.currency.network.rawId), feeCryptoCurrencyStatus = feeCryptoCurrencyStatus, availableFeeCurrencies = getAvailableFeeCurrencies(), - transactionFeeExtended = (fees as? LoadedFeeResult.Extended)?.fee, + transactionFeeExtended = (fees as? FeeSelectorLogic.LoadedFeeResult.Extended)?.fee, ), feeFiatRateUM = feeCryptoCurrencyStatus.value.fiatRate?.let { rate -> FeeFiatRateUM( @@ -90,7 +94,7 @@ internal class FeeSelectorLoadedTransformer( } private fun getAvailableFeeCurrencies(): ImmutableList? { - if (fees !is LoadedFeeResult.Extended) return null + if (fees !is FeeSelectorLogic.LoadedFeeResult.Extended) return null return fees.availableTokens.toImmutableList() } } \ No newline at end of file diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeSelectorLoadingTransformer.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/transformers/FeeSelectorLoadingTransformer.kt similarity index 65% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeSelectorLoadingTransformer.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/transformers/FeeSelectorLoadingTransformer.kt index fee0e3da63..9ae1f81ee4 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeSelectorLoadingTransformer.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/transformers/FeeSelectorLoadingTransformer.kt @@ -1,6 +1,6 @@ -package com.tangem.features.send.v2.feeselector.model.transformers +package com.tangem.features.send.feeselector.model.transformers -import com.tangem.features.send.v2.api.entity.FeeSelectorUM +import com.tangem.features.send.api.entity.FeeSelectorUM import com.tangem.utils.transformer.Transformer internal object FeeSelectorLoadingTransformer : Transformer { diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeSelectorNonceChangeTransformer.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/transformers/FeeSelectorNonceChangeTransformer.kt similarity index 77% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeSelectorNonceChangeTransformer.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/transformers/FeeSelectorNonceChangeTransformer.kt index 0450dc046f..5225d3abaf 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeSelectorNonceChangeTransformer.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/transformers/FeeSelectorNonceChangeTransformer.kt @@ -1,7 +1,7 @@ -package com.tangem.features.send.v2.feeselector.model.transformers +package com.tangem.features.send.feeselector.model.transformers -import com.tangem.features.send.v2.api.entity.FeeNonce -import com.tangem.features.send.v2.api.entity.FeeSelectorUM +import com.tangem.features.send.api.entity.FeeNonce +import com.tangem.features.send.api.entity.FeeSelectorUM import com.tangem.utils.transformer.Transformer internal class FeeSelectorNonceChangeTransformer( diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeSelectorRemoveSuggestedTransformer.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/transformers/FeeSelectorRemoveSuggestedTransformer.kt similarity index 81% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeSelectorRemoveSuggestedTransformer.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/transformers/FeeSelectorRemoveSuggestedTransformer.kt index 189c379da7..7c6cae3fd0 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeSelectorRemoveSuggestedTransformer.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/transformers/FeeSelectorRemoveSuggestedTransformer.kt @@ -1,7 +1,7 @@ -package com.tangem.features.send.v2.feeselector.model.transformers +package com.tangem.features.send.feeselector.model.transformers -import com.tangem.features.send.v2.api.entity.FeeItem -import com.tangem.features.send.v2.api.entity.FeeSelectorUM +import com.tangem.features.send.api.entity.FeeItem +import com.tangem.features.send.api.entity.FeeSelectorUM import com.tangem.utils.transformer.Transformer import kotlinx.collections.immutable.toImmutableList diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeSelectorTokenSelectedTransformer.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/transformers/FeeSelectorTokenSelectedTransformer.kt similarity index 82% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeSelectorTokenSelectedTransformer.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/transformers/FeeSelectorTokenSelectedTransformer.kt index c054119f3d..e732f6629c 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeSelectorTokenSelectedTransformer.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/model/transformers/FeeSelectorTokenSelectedTransformer.kt @@ -1,8 +1,8 @@ -package com.tangem.features.send.v2.feeselector.model.transformers +package com.tangem.features.send.feeselector.model.transformers import com.tangem.domain.models.currency.CryptoCurrencyStatus -import com.tangem.features.send.v2.api.entity.FeeItem -import com.tangem.features.send.v2.api.entity.FeeSelectorUM +import com.tangem.features.send.api.entity.FeeItem +import com.tangem.features.send.api.entity.FeeSelectorUM import com.tangem.utils.transformer.Transformer import kotlinx.collections.immutable.persistentListOf diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/route/FeeSelectorRoute.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/route/FeeSelectorRoute.kt similarity index 90% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/route/FeeSelectorRoute.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/route/FeeSelectorRoute.kt index 270230164d..bd70281cf2 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/route/FeeSelectorRoute.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/route/FeeSelectorRoute.kt @@ -1,10 +1,10 @@ -package com.tangem.features.send.v2.feeselector.route +package com.tangem.features.send.feeselector.route import androidx.compose.runtime.Immutable import com.tangem.core.decompose.navigation.Route import com.tangem.core.ui.extensions.TextReference import com.tangem.core.ui.extensions.resourceReference -import com.tangem.features.send.v2.impl.R +import com.tangem.features.send.impl.R import kotlinx.serialization.Serializable @Immutable diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/ui/FeeSelectorBlockContent.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/ui/FeeSelectorBlockContent.kt similarity index 97% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/ui/FeeSelectorBlockContent.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/ui/FeeSelectorBlockContent.kt index 80548cd189..2ea1b4e78d 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/ui/FeeSelectorBlockContent.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/ui/FeeSelectorBlockContent.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.feeselector.ui +package com.tangem.features.send.feeselector.ui import android.content.res.Configuration import androidx.compose.foundation.background @@ -46,8 +46,12 @@ import com.tangem.domain.models.currency.CryptoCurrency import com.tangem.domain.models.currency.CryptoCurrencyStatus import com.tangem.domain.models.network.Network import com.tangem.domain.transaction.error.GetFeeError -import com.tangem.features.send.v2.api.entity.* -import com.tangem.features.send.v2.impl.R +import com.tangem.features.send.api.entity.FeeExtraInfo +import com.tangem.features.send.api.entity.FeeFiatRateUM +import com.tangem.features.send.api.entity.FeeItem +import com.tangem.features.send.api.entity.FeeNonce +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.impl.R import com.tangem.utils.extensions.isSingleItem import kotlinx.collections.immutable.persistentListOf import java.math.BigDecimal diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/ui/FeeSelectorModalBottomSheet.kt b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/ui/FeeSelectorModalBottomSheet.kt similarity index 92% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/ui/FeeSelectorModalBottomSheet.kt rename to features/send/impl/src/main/java/com/tangem/features/send/feeselector/ui/FeeSelectorModalBottomSheet.kt index 6b40402b66..7a710a0ca9 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/ui/FeeSelectorModalBottomSheet.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/feeselector/ui/FeeSelectorModalBottomSheet.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.feeselector.ui +package com.tangem.features.send.feeselector.ui import androidx.compose.animation.animateContentSize import androidx.compose.animation.core.tween @@ -20,12 +20,12 @@ import com.tangem.core.ui.components.bottomsheets.modal.TangemModalBottomSheetWi import com.tangem.core.ui.decompose.ComposableContentComponent import com.tangem.core.ui.extensions.stringResourceSafe import com.tangem.core.ui.res.TangemTheme -import com.tangem.features.send.v2.api.entity.FeeItem -import com.tangem.features.send.v2.api.entity.FeeSelectorUM -import com.tangem.features.send.v2.api.params.FeeSelectorParams -import com.tangem.features.send.v2.feeselector.model.FeeSelectorIntents -import com.tangem.features.send.v2.feeselector.route.FeeSelectorRoute -import com.tangem.features.send.v2.impl.R +import com.tangem.features.send.api.entity.FeeItem +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.api.params.FeeSelectorParams +import com.tangem.features.send.feeselector.model.FeeSelectorIntents +import com.tangem.features.send.feeselector.route.FeeSelectorRoute +import com.tangem.features.send.impl.R @Suppress("LongParameterList") @Composable diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/networkselection/DefaultNetworkSelectionComponent.kt b/features/send/impl/src/main/java/com/tangem/features/send/networkselection/DefaultNetworkSelectionComponent.kt similarity index 80% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/networkselection/DefaultNetworkSelectionComponent.kt rename to features/send/impl/src/main/java/com/tangem/features/send/networkselection/DefaultNetworkSelectionComponent.kt index a154ed6312..5ac1296efc 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/networkselection/DefaultNetworkSelectionComponent.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/networkselection/DefaultNetworkSelectionComponent.kt @@ -1,12 +1,12 @@ -package com.tangem.features.send.v2.networkselection +package com.tangem.features.send.networkselection import androidx.compose.runtime.Composable import androidx.lifecycle.compose.collectAsStateWithLifecycle import com.tangem.core.decompose.context.AppComponentContext import com.tangem.core.decompose.model.getOrCreateModel -import com.tangem.features.send.v2.api.NetworkSelectionComponent -import com.tangem.features.send.v2.networkselection.model.NetworkSelectionModel -import com.tangem.features.send.v2.networkselection.ui.NetworkSelectionScreen +import com.tangem.features.send.api.NetworkSelectionComponent +import com.tangem.features.send.networkselection.model.NetworkSelectionModel +import com.tangem.features.send.networkselection.ui.NetworkSelectionScreen import dagger.assisted.Assisted import dagger.assisted.AssistedFactory import dagger.assisted.AssistedInject diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/networkselection/di/NetworkSelectionFeatureModule.kt b/features/send/impl/src/main/java/com/tangem/features/send/networkselection/di/NetworkSelectionFeatureModule.kt similarity index 67% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/networkselection/di/NetworkSelectionFeatureModule.kt rename to features/send/impl/src/main/java/com/tangem/features/send/networkselection/di/NetworkSelectionFeatureModule.kt index 8c099c5bfa..81609b8297 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/networkselection/di/NetworkSelectionFeatureModule.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/networkselection/di/NetworkSelectionFeatureModule.kt @@ -1,7 +1,7 @@ -package com.tangem.features.send.v2.networkselection.di +package com.tangem.features.send.networkselection.di -import com.tangem.features.send.v2.api.NetworkSelectionComponent -import com.tangem.features.send.v2.networkselection.DefaultNetworkSelectionComponent +import com.tangem.features.send.api.NetworkSelectionComponent +import com.tangem.features.send.networkselection.DefaultNetworkSelectionComponent import dagger.Binds import dagger.Module import dagger.hilt.InstallIn diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/networkselection/di/NetworkSelectionModelModule.kt b/features/send/impl/src/main/java/com/tangem/features/send/networkselection/di/NetworkSelectionModelModule.kt similarity index 77% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/networkselection/di/NetworkSelectionModelModule.kt rename to features/send/impl/src/main/java/com/tangem/features/send/networkselection/di/NetworkSelectionModelModule.kt index e1c8e50691..05e0148dad 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/networkselection/di/NetworkSelectionModelModule.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/networkselection/di/NetworkSelectionModelModule.kt @@ -1,8 +1,8 @@ -package com.tangem.features.send.v2.networkselection.di +package com.tangem.features.send.networkselection.di import com.tangem.core.decompose.di.ModelComponent import com.tangem.core.decompose.model.Model -import com.tangem.features.send.v2.networkselection.model.NetworkSelectionModel +import com.tangem.features.send.networkselection.model.NetworkSelectionModel import dagger.Binds import dagger.Module import dagger.hilt.InstallIn diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/networkselection/entity/NetworkSelectionUM.kt b/features/send/impl/src/main/java/com/tangem/features/send/networkselection/entity/NetworkSelectionUM.kt similarity index 94% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/networkselection/entity/NetworkSelectionUM.kt rename to features/send/impl/src/main/java/com/tangem/features/send/networkselection/entity/NetworkSelectionUM.kt index 680e6b27bf..91c54d699e 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/networkselection/entity/NetworkSelectionUM.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/networkselection/entity/NetworkSelectionUM.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.networkselection.entity +package com.tangem.features.send.networkselection.entity import androidx.compose.runtime.Immutable import com.tangem.core.ui.components.currency.icon.CurrencyIconState diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/networkselection/model/NetworkSelectionModel.kt b/features/send/impl/src/main/java/com/tangem/features/send/networkselection/model/NetworkSelectionModel.kt similarity index 95% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/networkselection/model/NetworkSelectionModel.kt rename to features/send/impl/src/main/java/com/tangem/features/send/networkselection/model/NetworkSelectionModel.kt index 8115f88043..e74d38f662 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/networkselection/model/NetworkSelectionModel.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/networkselection/model/NetworkSelectionModel.kt @@ -1,10 +1,10 @@ -package com.tangem.features.send.v2.networkselection.model +package com.tangem.features.send.networkselection.model import androidx.compose.runtime.Stable import com.tangem.common.getTotalCryptoAmount import com.tangem.common.getTotalFiatAmount import com.tangem.core.analytics.api.AnalyticsEventHandler -import com.tangem.features.send.v2.send.analytics.SendAnalyticEvents +import com.tangem.features.send.send.analytics.SendAnalyticEvents import com.tangem.core.decompose.di.ModelScoped import com.tangem.core.decompose.model.Model import com.tangem.core.decompose.model.ParamsContainer @@ -26,15 +26,16 @@ import com.tangem.domain.appcurrency.model.AppCurrency import com.tangem.domain.balancehiding.GetBalanceHidingSettingsUseCase import com.tangem.domain.models.StatusSource import com.tangem.common.ui.account.toUM +import com.tangem.core.ui.R import com.tangem.domain.models.account.AccountId import com.tangem.domain.models.account.filterCryptoPortfolio import com.tangem.domain.models.currency.CryptoCurrency import com.tangem.domain.models.currency.CryptoCurrencyStatus import com.tangem.domain.models.wallet.UserWalletId -import com.tangem.features.send.v2.api.NetworkSelectionComponent -import com.tangem.features.send.v2.networkselection.entity.AccountGroupUM -import com.tangem.features.send.v2.networkselection.entity.NetworkSelectionUM -import com.tangem.features.send.v2.networkselection.entity.WalletGroupUM +import com.tangem.features.send.api.NetworkSelectionComponent +import com.tangem.features.send.networkselection.entity.AccountGroupUM +import com.tangem.features.send.networkselection.entity.NetworkSelectionUM +import com.tangem.features.send.networkselection.entity.WalletGroupUM import com.tangem.utils.coroutines.CoroutineDispatcherProvider import kotlinx.collections.immutable.persistentListOf import kotlinx.collections.immutable.toImmutableList @@ -252,7 +253,7 @@ internal class NetworkSelectionModel @Inject constructor( private fun createSearchBar(query: String): SearchBarUM { return SearchBarUM( - placeholderText = resourceReference(com.tangem.core.ui.R.string.common_search_tokens), + placeholderText = resourceReference(R.string.common_search_tokens), query = query, onQueryChange = { searchQuery.value = it }, isActive = query.isNotEmpty(), diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/networkselection/ui/NetworkSelectionScreen.kt b/features/send/impl/src/main/java/com/tangem/features/send/networkselection/ui/NetworkSelectionScreen.kt similarity index 97% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/networkselection/ui/NetworkSelectionScreen.kt rename to features/send/impl/src/main/java/com/tangem/features/send/networkselection/ui/NetworkSelectionScreen.kt index aae3e17376..f2601eba7e 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/networkselection/ui/NetworkSelectionScreen.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/networkselection/ui/NetworkSelectionScreen.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.networkselection.ui +package com.tangem.features.send.networkselection.ui import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.core.animateFloatAsState @@ -37,9 +37,9 @@ import com.tangem.core.ui.extensions.pluralStringResourceSafe import com.tangem.core.ui.extensions.resolveReference import com.tangem.core.ui.extensions.stringResourceSafe import com.tangem.core.ui.res.TangemTheme -import com.tangem.features.send.v2.networkselection.entity.AccountGroupUM -import com.tangem.features.send.v2.networkselection.entity.NetworkSelectionUM -import com.tangem.features.send.v2.networkselection.entity.WalletGroupUM +import com.tangem.features.send.networkselection.entity.AccountGroupUM +import com.tangem.features.send.networkselection.entity.NetworkSelectionUM +import com.tangem.features.send.networkselection.entity.WalletGroupUM private const val CHEVRON_EXPANDED_ROTATION = 180f private const val CHEVRON_COLLAPSED_ROTATION = 0f diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/DefaultSendComponent.kt b/features/send/impl/src/main/java/com/tangem/features/send/send/DefaultSendComponent.kt similarity index 92% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/DefaultSendComponent.kt rename to features/send/impl/src/main/java/com/tangem/features/send/send/DefaultSendComponent.kt index 1caf6d2e89..dc13b7b071 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/DefaultSendComponent.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/send/DefaultSendComponent.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.send +package com.tangem.features.send.send import androidx.activity.compose.BackHandler import androidx.compose.foundation.layout.Box @@ -28,22 +28,22 @@ import com.tangem.core.ui.decompose.ComposableContentComponent import com.tangem.core.ui.extensions.resourceReference import com.tangem.core.ui.res.TangemTheme import com.tangem.domain.models.account.derivationIndex -import com.tangem.features.send.v2.api.FeeSelectorBlockComponent -import com.tangem.features.send.v2.api.SendComponent -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents -import com.tangem.features.send.v2.api.subcomponents.destination.SendDestinationComponentParams -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationUM -import com.tangem.features.send.v2.common.CommonSendRoute -import com.tangem.features.send.v2.common.ui.SendContent -import com.tangem.features.send.v2.common.ui.state.ConfirmUM -import com.tangem.features.send.v2.impl.R -import com.tangem.features.send.v2.send.confirm.SendConfirmComponent -import com.tangem.features.send.v2.send.model.SendModel -import com.tangem.features.send.v2.send.success.SendConfirmSuccessComponent -import com.tangem.features.send.v2.subcomponents.amount.SendAmountComponent -import com.tangem.features.send.v2.subcomponents.amount.SendAmountComponentParams -import com.tangem.features.send.v2.subcomponents.destination.DefaultSendDestinationBlockComponent -import com.tangem.features.send.v2.subcomponents.destination.DefaultSendDestinationComponent +import com.tangem.features.send.api.FeeSelectorBlockComponent +import com.tangem.features.send.api.SendComponent +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents +import com.tangem.features.send.api.subcomponents.destination.SendDestinationComponentParams +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationUM +import com.tangem.features.send.common.CommonSendRoute +import com.tangem.features.send.common.ui.SendContent +import com.tangem.features.send.common.ui.state.ConfirmUM +import com.tangem.features.send.send.confirm.SendConfirmComponent +import com.tangem.features.send.send.model.SendModel +import com.tangem.features.send.send.success.SendConfirmSuccessComponent +import com.tangem.features.send.subcomponents.amount.SendAmountComponent +import com.tangem.features.send.subcomponents.amount.SendAmountComponentParams +import com.tangem.features.send.subcomponents.destination.DefaultSendDestinationBlockComponent +import com.tangem.features.send.subcomponents.destination.DefaultSendDestinationComponent +import com.tangem.features.send.impl.R import dagger.assisted.Assisted import dagger.assisted.AssistedFactory import dagger.assisted.AssistedInject diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/analytics/SendAnalyticEvents.kt b/features/send/impl/src/main/java/com/tangem/features/send/send/analytics/SendAnalyticEvents.kt similarity index 93% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/analytics/SendAnalyticEvents.kt rename to features/send/impl/src/main/java/com/tangem/features/send/send/analytics/SendAnalyticEvents.kt index 73d13815e7..513eb13404 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/analytics/SendAnalyticEvents.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/send/analytics/SendAnalyticEvents.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.send.analytics +package com.tangem.features.send.send.analytics import com.tangem.core.analytics.models.AnalyticsEvent import com.tangem.core.analytics.models.AnalyticsParam @@ -12,7 +12,7 @@ import com.tangem.core.analytics.models.AnalyticsParam.Key.NONCE import com.tangem.core.analytics.models.AnalyticsParam.Key.TOKEN_PARAM import com.tangem.core.analytics.models.AppsFlyerIncludedEvent import com.tangem.core.ui.extensions.capitalize -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents /** * Send screen analytics @@ -48,7 +48,7 @@ internal sealed class SendAnalyticEvents( } put(ENS_ADDRESS, ensAddress) put(FEE_TOKEN, feeToken) - put(AnalyticsParam.Key.FEE_ASSET_TYPE, feeAssetType.value) + put(AnalyticsParam.FEE_ASSET_TYPE, feeAssetType.value) }, ), AppsFlyerIncludedEvent diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/analytics/SendAnalyticHelper.kt b/features/send/impl/src/main/java/com/tangem/features/send/send/analytics/SendAnalyticHelper.kt similarity index 89% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/analytics/SendAnalyticHelper.kt rename to features/send/impl/src/main/java/com/tangem/features/send/send/analytics/SendAnalyticHelper.kt index 8ab32e31a1..051fada063 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/analytics/SendAnalyticHelper.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/send/analytics/SendAnalyticHelper.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.send.analytics +package com.tangem.features.send.send.analytics import com.tangem.core.analytics.api.AnalyticsEventHandler import com.tangem.core.analytics.models.AnalyticsParam @@ -8,11 +8,11 @@ import com.tangem.domain.account.status.usecase.GetAccountCurrencyByAddressUseCa import com.tangem.domain.models.account.Account import com.tangem.domain.models.account.derivationIndex import com.tangem.domain.models.currency.CryptoCurrency -import com.tangem.features.send.v2.api.entity.FeeNonce -import com.tangem.features.send.v2.api.entity.FeeSelectorUM -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationTextFieldUM -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationUM -import com.tangem.features.send.v2.send.ui.state.SendUM +import com.tangem.features.send.api.entity.FeeNonce +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationTextFieldUM +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationUM +import com.tangem.features.send.send.ui.state.SendUM import javax.inject.Inject @ModelScoped diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/SendConfirmComponent.kt b/features/send/impl/src/main/java/com/tangem/features/send/send/confirm/SendConfirmComponent.kt similarity index 85% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/SendConfirmComponent.kt rename to features/send/impl/src/main/java/com/tangem/features/send/send/confirm/SendConfirmComponent.kt index 7bdbc5bb26..0b2def8145 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/SendConfirmComponent.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/send/confirm/SendConfirmComponent.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.send.confirm +package com.tangem.features.send.send.confirm import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue @@ -16,22 +16,22 @@ import com.tangem.domain.models.currency.CryptoCurrencyStatus import com.tangem.domain.models.wallet.UserWallet import com.tangem.domain.transaction.error.GetFeeError import com.tangem.domain.transaction.models.TransactionFeeExtended -import com.tangem.features.send.v2.api.FeeSelectorBlockComponent -import com.tangem.features.send.v2.api.SendNotificationsComponent -import com.tangem.features.send.v2.api.SendNotificationsComponent.Params.NotificationData -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents -import com.tangem.features.send.v2.api.entity.PredefinedValues -import com.tangem.features.send.v2.api.params.FeeSelectorParams -import com.tangem.features.send.v2.api.subcomponents.destination.SendDestinationComponentParams.DestinationBlockParams -import com.tangem.features.send.v2.common.CommonSendRoute -import com.tangem.features.send.v2.common.ui.state.ConfirmUM -import com.tangem.features.send.v2.send.confirm.model.SendConfirmModel -import com.tangem.features.send.v2.send.confirm.ui.SendConfirmContent -import com.tangem.features.send.v2.send.ui.state.SendUM -import com.tangem.features.send.v2.subcomponents.amount.SendAmountBlockComponent -import com.tangem.features.send.v2.subcomponents.amount.SendAmountComponentParams -import com.tangem.features.send.v2.subcomponents.destination.DefaultSendDestinationBlockComponent -import com.tangem.features.send.v2.subcomponents.notifications.DefaultSendNotificationsComponent +import com.tangem.features.send.api.FeeSelectorBlockComponent +import com.tangem.features.send.api.SendNotificationsComponent +import com.tangem.features.send.api.SendNotificationsComponent.Params.NotificationData +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents +import com.tangem.features.send.api.entity.PredefinedValues +import com.tangem.features.send.api.params.FeeSelectorParams +import com.tangem.features.send.api.subcomponents.destination.SendDestinationComponentParams.DestinationBlockParams +import com.tangem.features.send.common.CommonSendRoute +import com.tangem.features.send.common.ui.state.ConfirmUM +import com.tangem.features.send.send.confirm.model.SendConfirmModel +import com.tangem.features.send.send.confirm.ui.SendConfirmContent +import com.tangem.features.send.send.ui.state.SendUM +import com.tangem.features.send.subcomponents.amount.SendAmountBlockComponent +import com.tangem.features.send.subcomponents.amount.SendAmountComponentParams +import com.tangem.features.send.subcomponents.destination.DefaultSendDestinationBlockComponent +import com.tangem.features.send.subcomponents.notifications.DefaultSendNotificationsComponent import com.tangem.utils.extensions.orZero import kotlinx.coroutines.flow.* diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/model/ConfirmData.kt b/features/send/impl/src/main/java/com/tangem/features/send/send/confirm/model/ConfirmData.kt similarity index 87% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/model/ConfirmData.kt rename to features/send/impl/src/main/java/com/tangem/features/send/send/confirm/model/ConfirmData.kt index e6aa732445..96f1544055 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/model/ConfirmData.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/send/confirm/model/ConfirmData.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.send.confirm.model +package com.tangem.features.send.send.confirm.model import com.tangem.blockchain.common.transaction.Fee import com.tangem.domain.transaction.error.GetFeeError diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/model/SendConfirmClickIntents.kt b/features/send/impl/src/main/java/com/tangem/features/send/send/confirm/model/SendConfirmClickIntents.kt similarity index 80% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/model/SendConfirmClickIntents.kt rename to features/send/impl/src/main/java/com/tangem/features/send/send/confirm/model/SendConfirmClickIntents.kt index 6fa9dd0c23..31ad4027b6 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/model/SendConfirmClickIntents.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/send/confirm/model/SendConfirmClickIntents.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.send.confirm.model +package com.tangem.features.send.send.confirm.model internal interface SendConfirmClickIntents { diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/model/SendConfirmModel.kt b/features/send/impl/src/main/java/com/tangem/features/send/send/confirm/model/SendConfirmModel.kt similarity index 91% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/model/SendConfirmModel.kt rename to features/send/impl/src/main/java/com/tangem/features/send/send/confirm/model/SendConfirmModel.kt index 1a5ca89baa..90b2c60464 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/model/SendConfirmModel.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/send/confirm/model/SendConfirmModel.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.send.confirm.model +package com.tangem.features.send.send.confirm.model import android.os.SystemClock import androidx.compose.runtime.Stable @@ -43,33 +43,33 @@ import com.tangem.domain.transaction.usecase.SendTransactionUseCase import com.tangem.domain.transaction.usecase.gasless.CreateAndSendGaslessTransactionUseCase import com.tangem.domain.txhistory.usecase.GetExplorerTransactionUrlUseCase import com.tangem.domain.utils.convertToSdkAmount -import com.tangem.features.send.v2.api.SendNotificationsComponent -import com.tangem.features.send.v2.api.SendNotificationsComponent.Params.NotificationData -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents.SendScreenSource -import com.tangem.features.send.v2.api.callbacks.FeeSelectorModelCallback -import com.tangem.features.send.v2.api.entity.FeeNonce -import com.tangem.features.send.v2.api.params.FeeSelectorParams.FeeStateConfiguration -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationUM -import com.tangem.features.send.v2.api.subcomponents.feeSelector.FeeSelectorCheckReloadListener -import com.tangem.features.send.v2.api.subcomponents.feeSelector.FeeSelectorCheckReloadTrigger -import com.tangem.features.send.v2.api.subcomponents.feeSelector.FeeSelectorReloadTrigger -import com.tangem.features.send.v2.api.subcomponents.feeSelector.utils.FeeCalculationUtils.checkAndCalculateSubtractedAmount -import com.tangem.features.send.v2.api.subcomponents.notifications.SendNotificationsUpdateListener -import com.tangem.features.send.v2.api.subcomponents.notifications.SendNotificationsUpdateTrigger -import com.tangem.features.send.v2.common.CommonSendRoute -import com.tangem.features.send.v2.common.SendBalanceUpdater -import com.tangem.features.send.v2.common.SendConfirmAlertFactory -import com.tangem.features.send.v2.common.ui.state.ConfirmUM -import com.tangem.features.send.v2.impl.R -import com.tangem.features.send.v2.send.analytics.SendAnalyticHelper -import com.tangem.features.send.v2.send.confirm.SendConfirmComponent -import com.tangem.features.send.v2.send.confirm.model.transformers.SendConfirmInitialStateTransformer -import com.tangem.features.send.v2.send.confirm.model.transformers.SendConfirmSendingStateTransformer -import com.tangem.features.send.v2.send.confirm.model.transformers.SendConfirmSentStateTransformer -import com.tangem.features.send.v2.send.confirm.model.transformers.SendConfirmationNotificationsTransformerV2 -import com.tangem.features.send.v2.send.ui.state.SendUM -import com.tangem.features.send.v2.subcomponents.amount.SendAmountReduceTrigger +import com.tangem.features.send.api.SendNotificationsComponent +import com.tangem.features.send.api.SendNotificationsComponent.Params.NotificationData +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents.SendScreenSource +import com.tangem.features.send.api.callbacks.FeeSelectorModelCallback +import com.tangem.features.send.api.entity.FeeNonce +import com.tangem.features.send.api.params.FeeSelectorParams.FeeStateConfiguration +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationUM +import com.tangem.features.send.api.subcomponents.feeSelector.FeeSelectorCheckReloadListener +import com.tangem.features.send.api.subcomponents.feeSelector.FeeSelectorCheckReloadTrigger +import com.tangem.features.send.api.subcomponents.feeSelector.FeeSelectorReloadTrigger +import com.tangem.features.send.api.subcomponents.feeSelector.utils.FeeCalculationUtils.checkAndCalculateSubtractedAmount +import com.tangem.features.send.api.subcomponents.notifications.SendNotificationsUpdateListener +import com.tangem.features.send.api.subcomponents.notifications.SendNotificationsUpdateTrigger +import com.tangem.features.send.common.CommonSendRoute +import com.tangem.features.send.common.SendBalanceUpdater +import com.tangem.features.send.common.SendConfirmAlertFactory +import com.tangem.features.send.common.ui.state.ConfirmUM +import com.tangem.features.send.send.analytics.SendAnalyticHelper +import com.tangem.features.send.send.confirm.SendConfirmComponent +import com.tangem.features.send.send.confirm.model.transformers.SendConfirmInitialStateTransformer +import com.tangem.features.send.send.confirm.model.transformers.SendConfirmSendingStateTransformer +import com.tangem.features.send.send.confirm.model.transformers.SendConfirmSentStateTransformer +import com.tangem.features.send.send.confirm.model.transformers.SendConfirmationNotificationsTransformerV2 +import com.tangem.features.send.send.ui.state.SendUM +import com.tangem.features.send.subcomponents.amount.SendAmountReduceTrigger +import com.tangem.features.send.impl.R import com.tangem.utils.coroutines.CoroutineDispatcherProvider import com.tangem.utils.extensions.orZero import com.tangem.utils.extensions.stripZeroPlainString @@ -79,7 +79,7 @@ import kotlinx.coroutines.flow.* import kotlinx.coroutines.launch import java.math.BigDecimal import javax.inject.Inject -import com.tangem.features.send.v2.api.entity.FeeSelectorUM as FeeSelectorUMRedesigned +import com.tangem.features.send.api.entity.FeeSelectorUM as FeeSelectorUMRedesigned @Suppress("LongParameterList", "LargeClass") @Stable diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/model/transformers/SendConfirmInitialStateTransformer.kt b/features/send/impl/src/main/java/com/tangem/features/send/send/confirm/model/transformers/SendConfirmInitialStateTransformer.kt similarity index 83% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/model/transformers/SendConfirmInitialStateTransformer.kt rename to features/send/impl/src/main/java/com/tangem/features/send/send/confirm/model/transformers/SendConfirmInitialStateTransformer.kt index bd50b38485..3cbd47838d 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/model/transformers/SendConfirmInitialStateTransformer.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/send/confirm/model/transformers/SendConfirmInitialStateTransformer.kt @@ -1,7 +1,7 @@ -package com.tangem.features.send.v2.send.confirm.model.transformers +package com.tangem.features.send.send.confirm.model.transformers import com.tangem.core.ui.extensions.TextReference -import com.tangem.features.send.v2.common.ui.state.ConfirmUM +import com.tangem.features.send.common.ui.state.ConfirmUM import com.tangem.utils.transformer.Transformer import kotlinx.collections.immutable.persistentListOf diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/model/transformers/SendConfirmSendingStateTransformer.kt b/features/send/impl/src/main/java/com/tangem/features/send/send/confirm/model/transformers/SendConfirmSendingStateTransformer.kt similarity index 72% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/model/transformers/SendConfirmSendingStateTransformer.kt rename to features/send/impl/src/main/java/com/tangem/features/send/send/confirm/model/transformers/SendConfirmSendingStateTransformer.kt index 9a8e44344a..361dc34536 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/model/transformers/SendConfirmSendingStateTransformer.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/send/confirm/model/transformers/SendConfirmSendingStateTransformer.kt @@ -1,7 +1,7 @@ -package com.tangem.features.send.v2.send.confirm.model.transformers +package com.tangem.features.send.send.confirm.model.transformers -import com.tangem.features.send.v2.common.ui.state.ConfirmUM -import com.tangem.features.send.v2.send.ui.state.SendUM +import com.tangem.features.send.common.ui.state.ConfirmUM +import com.tangem.features.send.send.ui.state.SendUM import com.tangem.utils.transformer.Transformer internal class SendConfirmSendingStateTransformer( diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/model/transformers/SendConfirmSentStateTransformer.kt b/features/send/impl/src/main/java/com/tangem/features/send/send/confirm/model/transformers/SendConfirmSentStateTransformer.kt similarity index 74% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/model/transformers/SendConfirmSentStateTransformer.kt rename to features/send/impl/src/main/java/com/tangem/features/send/send/confirm/model/transformers/SendConfirmSentStateTransformer.kt index 2d1b64e6b7..87157091c1 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/model/transformers/SendConfirmSentStateTransformer.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/send/confirm/model/transformers/SendConfirmSentStateTransformer.kt @@ -1,8 +1,8 @@ -package com.tangem.features.send.v2.send.confirm.model.transformers +package com.tangem.features.send.send.confirm.model.transformers import com.tangem.blockchain.common.TransactionData -import com.tangem.features.send.v2.common.ui.state.ConfirmUM -import com.tangem.features.send.v2.send.ui.state.SendUM +import com.tangem.features.send.common.ui.state.ConfirmUM +import com.tangem.features.send.send.ui.state.SendUM import com.tangem.utils.transformer.Transformer internal class SendConfirmSentStateTransformer( diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/model/transformers/SendConfirmationNotificationsTransformerV2.kt b/features/send/impl/src/main/java/com/tangem/features/send/send/confirm/model/transformers/SendConfirmationNotificationsTransformerV2.kt similarity index 88% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/model/transformers/SendConfirmationNotificationsTransformerV2.kt rename to features/send/impl/src/main/java/com/tangem/features/send/send/confirm/model/transformers/SendConfirmationNotificationsTransformerV2.kt index 163e6764b0..141bcab743 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/model/transformers/SendConfirmationNotificationsTransformerV2.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/send/confirm/model/transformers/SendConfirmationNotificationsTransformerV2.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.send.confirm.model.transformers +package com.tangem.features.send.send.confirm.model.transformers import com.tangem.blockchain.common.transaction.Fee import com.tangem.common.ui.amountScreen.models.AmountState @@ -12,13 +12,13 @@ import com.tangem.core.ui.format.bigdecimal.fiat import com.tangem.core.ui.format.bigdecimal.format import com.tangem.domain.appcurrency.model.AppCurrency import com.tangem.domain.models.currency.CryptoCurrency -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents -import com.tangem.features.send.v2.api.entity.FeeSelectorUM -import com.tangem.features.send.v2.api.subcomponents.feeSelector.utils.FeeCalculationUtils -import com.tangem.features.send.v2.api.utils.formatFooterFiatFee -import com.tangem.features.send.v2.api.utils.getTronTokenFeeSendingText -import com.tangem.features.send.v2.common.ui.state.ConfirmUM -import com.tangem.features.send.v2.impl.R +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.api.subcomponents.feeSelector.utils.FeeCalculationUtils +import com.tangem.features.send.api.utils.formatFooterFiatFee +import com.tangem.features.send.api.utils.getTronTokenFeeSendingText +import com.tangem.features.send.common.ui.state.ConfirmUM +import com.tangem.features.send.impl.R import com.tangem.utils.transformer.Transformer import kotlinx.collections.immutable.toPersistentList diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/ui/SendConfirmContent.kt b/features/send/impl/src/main/java/com/tangem/features/send/send/confirm/ui/SendConfirmContent.kt similarity index 82% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/ui/SendConfirmContent.kt rename to features/send/impl/src/main/java/com/tangem/features/send/send/confirm/ui/SendConfirmContent.kt index cb97fc4632..2c36876bda 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/ui/SendConfirmContent.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/send/confirm/ui/SendConfirmContent.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.send.confirm.ui +package com.tangem.features.send.send.confirm.ui import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement @@ -14,14 +14,14 @@ import androidx.compose.ui.unit.dp import com.tangem.common.ui.notifications.NotificationUM import com.tangem.core.ui.components.SpacerH import com.tangem.core.ui.res.TangemTheme -import com.tangem.features.send.v2.api.FeeSelectorBlockComponent -import com.tangem.features.send.v2.common.ui.state.ConfirmUM -import com.tangem.features.send.v2.common.ui.tapHelp -import com.tangem.features.send.v2.send.ui.state.SendUM -import com.tangem.features.send.v2.subcomponents.amount.SendAmountBlockComponent -import com.tangem.features.send.v2.subcomponents.destination.DefaultSendDestinationBlockComponent -import com.tangem.features.send.v2.subcomponents.notifications -import com.tangem.features.send.v2.subcomponents.notifications.DefaultSendNotificationsComponent +import com.tangem.features.send.api.FeeSelectorBlockComponent +import com.tangem.features.send.common.ui.state.ConfirmUM +import com.tangem.features.send.common.ui.tapHelp +import com.tangem.features.send.send.ui.state.SendUM +import com.tangem.features.send.subcomponents.amount.SendAmountBlockComponent +import com.tangem.features.send.subcomponents.destination.DefaultSendDestinationBlockComponent +import com.tangem.features.send.subcomponents.notifications +import com.tangem.features.send.subcomponents.notifications.DefaultSendNotificationsComponent import kotlinx.collections.immutable.ImmutableList private const val BLOCKS_KEY = "BLOCKS_KEY" diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/di/CommonSendModelModule.kt b/features/send/impl/src/main/java/com/tangem/features/send/send/di/CommonSendModelModule.kt similarity index 74% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/di/CommonSendModelModule.kt rename to features/send/impl/src/main/java/com/tangem/features/send/send/di/CommonSendModelModule.kt index bff655e61d..82fde5eef4 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/di/CommonSendModelModule.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/send/di/CommonSendModelModule.kt @@ -1,10 +1,10 @@ -package com.tangem.features.send.v2.send.di +package com.tangem.features.send.send.di import com.tangem.core.decompose.di.ModelComponent import com.tangem.core.decompose.model.Model -import com.tangem.features.send.v2.send.confirm.model.SendConfirmModel -import com.tangem.features.send.v2.send.model.SendModel -import com.tangem.features.send.v2.send.success.model.SendConfirmSuccessModel +import com.tangem.features.send.send.confirm.model.SendConfirmModel +import com.tangem.features.send.send.model.SendModel +import com.tangem.features.send.send.success.model.SendConfirmSuccessModel import dagger.Binds import dagger.Module import dagger.hilt.InstallIn diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/model/SendModel.kt b/features/send/impl/src/main/java/com/tangem/features/send/send/model/SendModel.kt similarity index 91% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/model/SendModel.kt rename to features/send/impl/src/main/java/com/tangem/features/send/send/model/SendModel.kt index a4be5674aa..84f2df688a 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/model/SendModel.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/send/model/SendModel.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.send.model +package com.tangem.features.send.send.model import androidx.compose.runtime.Stable import arrow.core.Either @@ -43,25 +43,24 @@ import com.tangem.domain.transaction.usecase.gasless.GetFeeForTokenUseCase import com.tangem.domain.utils.convertToSdkAmount import com.tangem.domain.wallets.models.GetUserWalletError import com.tangem.domain.wallets.usecase.GetUserWalletUseCase -import com.tangem.features.send.v2.api.SendComponent -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents.SendScreenSource -import com.tangem.features.send.v2.api.entity.FeeSelectorUM -import com.tangem.features.send.v2.api.entity.PredefinedValues -import com.tangem.features.send.v2.api.entity.isFromMainScreenQr -import com.tangem.features.send.v2.api.subcomponents.destination.SendDestinationComponent -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationUM -import com.tangem.features.send.v2.common.CommonSendRoute -import com.tangem.features.send.v2.common.CommonSendRoute.* -import com.tangem.features.send.v2.common.SendConfirmAlertFactory -import com.tangem.features.send.v2.common.ui.state.ConfirmUM -import com.tangem.features.send.v2.send.analytics.SendAnalyticEvents -import com.tangem.features.send.v2.send.confirm.SendConfirmComponent -import com.tangem.features.send.v2.send.success.SendConfirmSuccessComponent -import com.tangem.features.send.v2.send.ui.state.SendUM -import com.tangem.features.send.v2.subcomponents.amount.SendAmountComponent -import com.tangem.features.send.v2.subcomponents.amount.SendAmountUpdateTrigger -import com.tangem.features.send.v2.subcomponents.destination.model.transformers.SendDestinationInitialStateTransformer +import com.tangem.features.send.api.SendComponent +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents.SendScreenSource +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.api.entity.PredefinedValues +import com.tangem.features.send.api.entity.isFromMainScreenQr +import com.tangem.features.send.api.subcomponents.destination.SendDestinationComponent +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationUM +import com.tangem.features.send.common.CommonSendRoute +import com.tangem.features.send.common.SendConfirmAlertFactory +import com.tangem.features.send.common.ui.state.ConfirmUM +import com.tangem.features.send.send.analytics.SendAnalyticEvents +import com.tangem.features.send.send.confirm.SendConfirmComponent +import com.tangem.features.send.send.success.SendConfirmSuccessComponent +import com.tangem.features.send.send.ui.state.SendUM +import com.tangem.features.send.subcomponents.amount.SendAmountComponent +import com.tangem.features.send.subcomponents.amount.SendAmountUpdateTrigger +import com.tangem.features.send.subcomponents.destination.model.transformers.SendDestinationInitialStateTransformer import com.tangem.utils.coroutines.CoroutineDispatcherProvider import com.tangem.utils.coroutines.JobHolder import com.tangem.utils.coroutines.saveIn @@ -119,9 +118,9 @@ internal class SendModel @Inject constructor( field = MutableStateFlow(false) val initialRoute = if (params.amount == null) { - Amount(isEditMode = false) + CommonSendRoute.Amount(isEditMode = false) } else { - Empty + CommonSendRoute.Empty } val currentRoute = MutableStateFlow(initialRoute) @@ -199,7 +198,7 @@ internal class SendModel @Inject constructor( override fun onBackClick() { when (val route = currentRoute.value) { - is Amount -> if (!route.isEditMode) { + is CommonSendRoute.Amount -> if (!route.isEditMode) { analyticsEventHandler.send( CommonSendAnalyticEvents.CloseButtonClicked( categoryName = analyticCategoryName, @@ -209,7 +208,7 @@ internal class SendModel @Inject constructor( ), ) } - is Destination -> if (!route.isEditMode) { + is CommonSendRoute.Destination -> if (!route.isEditMode) { analyticsEventHandler.send( CommonSendAnalyticEvents.CloseButtonClicked( categoryName = analyticCategoryName, @@ -230,16 +229,16 @@ internal class SendModel @Inject constructor( onBackClick() } else { when (currentRoute.value) { - is Amount -> { + is CommonSendRoute.Amount -> { val nextRoute = if (predefinedValues.isFromMainScreenQr) { - Confirm + CommonSendRoute.Confirm } else { - Destination(isEditMode = false) + CommonSendRoute.Destination(isEditMode = false) } router.push(nextRoute) } - is Destination -> router.push(Confirm) - Confirm -> router.push(ConfirmSuccess) + is CommonSendRoute.Destination -> router.push(CommonSendRoute.Confirm) + CommonSendRoute.Confirm -> router.push(CommonSendRoute.ConfirmSuccess) else -> onBackClick() } } @@ -267,7 +266,7 @@ internal class SendModel @Inject constructor( navigationUM = NavigationUM.Empty, ) } - router.popTo(Amount(isEditMode = false)) + router.popTo(CommonSendRoute.Amount(isEditMode = false)) } override fun onError(error: GetUserWalletError) { @@ -454,14 +453,14 @@ internal class SendModel @Inject constructor( private fun resolveInitialRoute(cryptoCurrencyStatus: CryptoCurrencyStatus): CommonSendRoute? { return when (predefinedValues) { - is PredefinedValues.Content.Deeplink -> Confirm + is PredefinedValues.Content.Deeplink -> CommonSendRoute.Confirm is PredefinedValues.Content.QrCode -> { if (!predefinedValues.isFromMainScreenQr) return null val amount = (predefinedValues as PredefinedValues.Content.QrCode).amount ?: return null if (isPredefinedAmountExceedsBalance(amount, cryptoCurrencyStatus)) { - Amount(isEditMode = false) + CommonSendRoute.Amount(isEditMode = false) } else { - Confirm + CommonSendRoute.Confirm } } PredefinedValues.Empty -> null diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/success/SendConfirmSuccessComponent.kt b/features/send/impl/src/main/java/com/tangem/features/send/send/success/SendConfirmSuccessComponent.kt similarity index 77% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/success/SendConfirmSuccessComponent.kt rename to features/send/impl/src/main/java/com/tangem/features/send/send/success/SendConfirmSuccessComponent.kt index 5468cbf45e..314345341d 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/success/SendConfirmSuccessComponent.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/send/success/SendConfirmSuccessComponent.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.send.success +package com.tangem.features.send.send.success import androidx.compose.runtime.Composable import androidx.compose.runtime.collectAsState @@ -7,11 +7,11 @@ import androidx.compose.ui.Modifier import com.tangem.core.decompose.context.AppComponentContext import com.tangem.core.decompose.model.getOrCreateModel import com.tangem.core.ui.decompose.ComposableContentComponent -import com.tangem.features.send.v2.api.subcomponents.destination.SendDestinationBlockComponent -import com.tangem.features.send.v2.common.CommonSendRoute -import com.tangem.features.send.v2.send.success.model.SendConfirmSuccessModel -import com.tangem.features.send.v2.send.success.ui.SendConfirmSuccessContent -import com.tangem.features.send.v2.send.ui.state.SendUM +import com.tangem.features.send.api.subcomponents.destination.SendDestinationBlockComponent +import com.tangem.features.send.common.CommonSendRoute +import com.tangem.features.send.send.success.model.SendConfirmSuccessModel +import com.tangem.features.send.send.success.ui.SendConfirmSuccessContent +import com.tangem.features.send.send.ui.state.SendUM import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.StateFlow diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/success/model/SendConfirmSuccessModel.kt b/features/send/impl/src/main/java/com/tangem/features/send/send/success/model/SendConfirmSuccessModel.kt similarity index 91% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/success/model/SendConfirmSuccessModel.kt rename to features/send/impl/src/main/java/com/tangem/features/send/send/success/model/SendConfirmSuccessModel.kt index e2b3a973d6..f13a80be84 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/success/model/SendConfirmSuccessModel.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/send/success/model/SendConfirmSuccessModel.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.send.success.model +package com.tangem.features.send.send.success.model import androidx.compose.runtime.Stable import com.tangem.common.routing.AppRouter @@ -12,12 +12,12 @@ import com.tangem.core.navigation.share.ShareManager import com.tangem.core.navigation.url.UrlOpener import com.tangem.core.ui.extensions.resourceReference import com.tangem.core.ui.extensions.stringReference -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents.SendScreenSource -import com.tangem.features.send.v2.common.CommonSendRoute -import com.tangem.features.send.v2.impl.R -import com.tangem.features.send.v2.send.success.SendConfirmSuccessComponent -import com.tangem.features.send.v2.send.ui.state.SendUM +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents.SendScreenSource +import com.tangem.features.send.common.CommonSendRoute +import com.tangem.features.send.send.success.SendConfirmSuccessComponent +import com.tangem.features.send.send.ui.state.SendUM +import com.tangem.features.send.impl.R import com.tangem.utils.coroutines.CoroutineDispatcherProvider import kotlinx.coroutines.flow.combine import kotlinx.coroutines.flow.filter diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/success/ui/SendConfirmSuccessContent.kt b/features/send/impl/src/main/java/com/tangem/features/send/send/success/ui/SendConfirmSuccessContent.kt similarity index 91% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/success/ui/SendConfirmSuccessContent.kt rename to features/send/impl/src/main/java/com/tangem/features/send/send/success/ui/SendConfirmSuccessContent.kt index 80724db319..e0788a8bf3 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/success/ui/SendConfirmSuccessContent.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/send/success/ui/SendConfirmSuccessContent.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.send.success.ui +package com.tangem.features.send.send.success.ui import androidx.compose.animation.* import androidx.compose.foundation.background @@ -22,11 +22,11 @@ import com.tangem.core.ui.test.TransactionSuccessScreenTestTags import com.tangem.core.ui.utils.DateTimeFormatters import com.tangem.core.ui.utils.toPx import com.tangem.core.ui.utils.toTimeFormat -import com.tangem.features.send.v2.api.subcomponents.destination.SendDestinationBlockComponent -import com.tangem.features.send.v2.common.ui.FeeBlockSuccess -import com.tangem.features.send.v2.common.ui.state.ConfirmUM -import com.tangem.features.send.v2.impl.R -import com.tangem.features.send.v2.send.ui.state.SendUM +import com.tangem.features.send.api.subcomponents.destination.SendDestinationBlockComponent +import com.tangem.features.send.common.ui.FeeBlockSuccess +import com.tangem.features.send.common.ui.state.ConfirmUM +import com.tangem.features.send.send.ui.state.SendUM +import com.tangem.features.send.impl.R @Composable internal fun SendConfirmSuccessContent(sendUM: SendUM, destinationBlockComponent: SendDestinationBlockComponent) { diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/ui/state/ButtonsUM.kt b/features/send/impl/src/main/java/com/tangem/features/send/send/ui/state/ButtonsUM.kt similarity index 93% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/ui/state/ButtonsUM.kt rename to features/send/impl/src/main/java/com/tangem/features/send/send/ui/state/ButtonsUM.kt index 9b4d716e8a..a3b988abad 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/ui/state/ButtonsUM.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/send/ui/state/ButtonsUM.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.send.ui.state +package com.tangem.features.send.send.ui.state import androidx.annotation.DrawableRes import com.tangem.core.ui.extensions.TextReference diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/ui/state/SendUM.kt b/features/send/impl/src/main/java/com/tangem/features/send/send/ui/state/SendUM.kt similarity index 52% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/ui/state/SendUM.kt rename to features/send/impl/src/main/java/com/tangem/features/send/send/ui/state/SendUM.kt index 7beee9b121..4ae371cce7 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/ui/state/SendUM.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/send/ui/state/SendUM.kt @@ -1,11 +1,11 @@ -package com.tangem.features.send.v2.send.ui.state +package com.tangem.features.send.send.ui.state import com.tangem.common.ui.amountScreen.models.AmountState import com.tangem.common.ui.navigationButtons.NavigationUM -import com.tangem.features.send.v2.api.entity.FeeSelectorUM -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationUM -import com.tangem.features.send.v2.common.ui.state.ConfirmUM -import com.tangem.features.send.v2.send.confirm.model.ConfirmData +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationUM +import com.tangem.features.send.common.ui.state.ConfirmUM +import com.tangem.features.send.send.confirm.model.ConfirmData internal data class SendUM( val amountUM: AmountState, diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/DefaultNFTSendComponent.kt b/features/send/impl/src/main/java/com/tangem/features/send/sendnft/DefaultNFTSendComponent.kt similarity index 92% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/DefaultNFTSendComponent.kt rename to features/send/impl/src/main/java/com/tangem/features/send/sendnft/DefaultNFTSendComponent.kt index 250a2adb28..eb6ed71a6a 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/DefaultNFTSendComponent.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/sendnft/DefaultNFTSendComponent.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.sendnft +package com.tangem.features.send.sendnft import androidx.activity.compose.BackHandler import androidx.compose.runtime.Composable @@ -18,17 +18,17 @@ import com.tangem.core.decompose.model.getOrCreateModel import com.tangem.core.decompose.navigation.inner.InnerRouter import com.tangem.core.ui.decompose.ComposableContentComponent import com.tangem.core.ui.extensions.resourceReference -import com.tangem.features.send.v2.api.NFTSendComponent -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents -import com.tangem.features.send.v2.api.subcomponents.destination.SendDestinationComponentParams -import com.tangem.features.send.v2.common.CommonSendRoute -import com.tangem.features.send.v2.common.ui.SendContent -import com.tangem.features.send.v2.common.ui.state.ConfirmUM -import com.tangem.features.send.v2.impl.R -import com.tangem.features.send.v2.sendnft.confirm.NFTSendConfirmComponent -import com.tangem.features.send.v2.sendnft.model.NFTSendModel -import com.tangem.features.send.v2.sendnft.success.NFTSendSuccessComponent -import com.tangem.features.send.v2.subcomponents.destination.DefaultSendDestinationComponent +import com.tangem.features.send.api.NFTSendComponent +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents +import com.tangem.features.send.api.subcomponents.destination.SendDestinationComponentParams +import com.tangem.features.send.common.CommonSendRoute +import com.tangem.features.send.common.ui.SendContent +import com.tangem.features.send.common.ui.state.ConfirmUM +import com.tangem.features.send.sendnft.confirm.NFTSendConfirmComponent +import com.tangem.features.send.sendnft.model.NFTSendModel +import com.tangem.features.send.sendnft.success.NFTSendSuccessComponent +import com.tangem.features.send.subcomponents.destination.DefaultSendDestinationComponent +import com.tangem.features.send.impl.R import dagger.assisted.Assisted import dagger.assisted.AssistedFactory import dagger.assisted.AssistedInject diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/analytics/NFTSendAnalyticEvents.kt b/features/send/impl/src/main/java/com/tangem/features/send/sendnft/analytics/NFTSendAnalyticEvents.kt similarity index 90% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/analytics/NFTSendAnalyticEvents.kt rename to features/send/impl/src/main/java/com/tangem/features/send/sendnft/analytics/NFTSendAnalyticEvents.kt index 25700edaa6..f27db84048 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/analytics/NFTSendAnalyticEvents.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/sendnft/analytics/NFTSendAnalyticEvents.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.sendnft.analytics +package com.tangem.features.send.sendnft.analytics import com.tangem.core.analytics.models.AnalyticsEvent import com.tangem.core.analytics.models.AnalyticsParam @@ -7,7 +7,7 @@ import com.tangem.core.analytics.models.AnalyticsParam.Key.FEE_TYPE import com.tangem.core.analytics.models.AnalyticsParam.Key.NONCE import com.tangem.core.analytics.models.AnalyticsParam.Key.TOKEN_PARAM import com.tangem.core.ui.extensions.capitalize -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents /** * Send screen analytics diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/analytics/NFTSendAnalyticHelper.kt b/features/send/impl/src/main/java/com/tangem/features/send/sendnft/analytics/NFTSendAnalyticHelper.kt similarity index 80% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/analytics/NFTSendAnalyticHelper.kt rename to features/send/impl/src/main/java/com/tangem/features/send/sendnft/analytics/NFTSendAnalyticHelper.kt index 5172f13211..a98e44d9b7 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/analytics/NFTSendAnalyticHelper.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/sendnft/analytics/NFTSendAnalyticHelper.kt @@ -1,16 +1,16 @@ -package com.tangem.features.send.v2.sendnft.analytics +package com.tangem.features.send.sendnft.analytics import com.tangem.core.analytics.api.AnalyticsEventHandler import com.tangem.core.analytics.models.AnalyticsParam import com.tangem.core.analytics.models.Basic import com.tangem.core.decompose.di.ModelScoped import com.tangem.domain.models.currency.CryptoCurrency -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents.Companion.NFT_SEND_CATEGORY -import com.tangem.features.send.v2.api.entity.FeeNonce -import com.tangem.features.send.v2.api.entity.FeeSelectorUM -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationTextFieldUM -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationUM -import com.tangem.features.send.v2.sendnft.ui.state.NFTSendUM +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents.Companion.NFT_SEND_CATEGORY +import com.tangem.features.send.api.entity.FeeNonce +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationTextFieldUM +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationUM +import com.tangem.features.send.sendnft.ui.state.NFTSendUM import javax.inject.Inject @ModelScoped diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/NFTSendConfirmComponent.kt b/features/send/impl/src/main/java/com/tangem/features/send/sendnft/confirm/NFTSendConfirmComponent.kt similarity index 85% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/NFTSendConfirmComponent.kt rename to features/send/impl/src/main/java/com/tangem/features/send/sendnft/confirm/NFTSendConfirmComponent.kt index 98e150c9bb..df7d35b7b7 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/NFTSendConfirmComponent.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/sendnft/confirm/NFTSendConfirmComponent.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.sendnft.confirm +package com.tangem.features.send.sendnft.confirm import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue @@ -19,21 +19,21 @@ import com.tangem.domain.models.wallet.UserWallet import com.tangem.domain.nft.models.NFTAsset import com.tangem.domain.transaction.error.GetFeeError import com.tangem.features.nft.component.NFTDetailsBlockComponent -import com.tangem.features.send.v2.api.FeeSelectorBlockComponent -import com.tangem.features.send.v2.api.SendNotificationsComponent -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents -import com.tangem.features.send.v2.api.entity.PredefinedValues -import com.tangem.features.send.v2.api.params.FeeSelectorParams -import com.tangem.features.send.v2.api.params.FeeSelectorParams.FeeStateConfiguration -import com.tangem.features.send.v2.api.subcomponents.destination.SendDestinationComponentParams.DestinationBlockParams -import com.tangem.features.send.v2.common.CommonSendRoute -import com.tangem.features.send.v2.common.ui.state.ConfirmUM -import com.tangem.features.send.v2.impl.R -import com.tangem.features.send.v2.sendnft.confirm.model.NFTSendConfirmModel -import com.tangem.features.send.v2.sendnft.confirm.ui.NFTSendConfirmContent -import com.tangem.features.send.v2.sendnft.ui.state.NFTSendUM -import com.tangem.features.send.v2.subcomponents.destination.DefaultSendDestinationBlockComponent -import com.tangem.features.send.v2.subcomponents.notifications.DefaultSendNotificationsComponent +import com.tangem.features.send.api.FeeSelectorBlockComponent +import com.tangem.features.send.api.SendNotificationsComponent +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents +import com.tangem.features.send.api.entity.PredefinedValues +import com.tangem.features.send.api.params.FeeSelectorParams +import com.tangem.features.send.api.params.FeeSelectorParams.FeeStateConfiguration +import com.tangem.features.send.api.subcomponents.destination.SendDestinationComponentParams.DestinationBlockParams +import com.tangem.features.send.common.CommonSendRoute +import com.tangem.features.send.common.ui.state.ConfirmUM +import com.tangem.features.send.sendnft.confirm.model.NFTSendConfirmModel +import com.tangem.features.send.sendnft.confirm.ui.NFTSendConfirmContent +import com.tangem.features.send.sendnft.ui.state.NFTSendUM +import com.tangem.features.send.subcomponents.destination.DefaultSendDestinationBlockComponent +import com.tangem.features.send.subcomponents.notifications.DefaultSendNotificationsComponent +import com.tangem.features.send.impl.R import dagger.assisted.Assisted import dagger.assisted.AssistedFactory import dagger.assisted.AssistedInject diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/model/ConfirmData.kt b/features/send/impl/src/main/java/com/tangem/features/send/sendnft/confirm/model/ConfirmData.kt similarity index 81% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/model/ConfirmData.kt rename to features/send/impl/src/main/java/com/tangem/features/send/sendnft/confirm/model/ConfirmData.kt index 704ce61b5c..3615d4a1bb 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/model/ConfirmData.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/sendnft/confirm/model/ConfirmData.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.sendnft.confirm.model +package com.tangem.features.send.sendnft.confirm.model import com.tangem.blockchain.common.transaction.Fee import com.tangem.domain.transaction.error.GetFeeError diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/model/NFTSendConfirmClickIntents.kt b/features/send/impl/src/main/java/com/tangem/features/send/sendnft/confirm/model/NFTSendConfirmClickIntents.kt similarity index 78% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/model/NFTSendConfirmClickIntents.kt rename to features/send/impl/src/main/java/com/tangem/features/send/sendnft/confirm/model/NFTSendConfirmClickIntents.kt index ed9122b058..68e6ae0db5 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/model/NFTSendConfirmClickIntents.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/sendnft/confirm/model/NFTSendConfirmClickIntents.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.sendnft.confirm.model +package com.tangem.features.send.sendnft.confirm.model internal interface NFTSendConfirmClickIntents { diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/model/NFTSendConfirmModel.kt b/features/send/impl/src/main/java/com/tangem/features/send/sendnft/confirm/model/NFTSendConfirmModel.kt similarity index 90% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/model/NFTSendConfirmModel.kt rename to features/send/impl/src/main/java/com/tangem/features/send/sendnft/confirm/model/NFTSendConfirmModel.kt index a707e8b5c1..cbb6353620 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/model/NFTSendConfirmModel.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/sendnft/confirm/model/NFTSendConfirmModel.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.sendnft.confirm.model +package com.tangem.features.send.sendnft.confirm.model import android.os.SystemClock import arrow.core.getOrElse @@ -32,28 +32,28 @@ import com.tangem.domain.transaction.usecase.CreateNFTTransferTransactionUseCase import com.tangem.domain.transaction.usecase.SendTransactionUseCase import com.tangem.domain.txhistory.usecase.GetExplorerTransactionUrlUseCase import com.tangem.features.nft.entity.NFTSendSuccessTrigger -import com.tangem.features.send.v2.api.SendNotificationsComponent -import com.tangem.features.send.v2.api.SendNotificationsComponent.Params.NotificationData -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents.SendScreenSource -import com.tangem.features.send.v2.api.callbacks.FeeSelectorModelCallback -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationUM -import com.tangem.features.send.v2.api.subcomponents.feeSelector.FeeSelectorCheckReloadListener -import com.tangem.features.send.v2.api.subcomponents.feeSelector.FeeSelectorCheckReloadTrigger -import com.tangem.features.send.v2.api.subcomponents.feeSelector.FeeSelectorReloadTrigger -import com.tangem.features.send.v2.api.subcomponents.notifications.SendNotificationsUpdateListener -import com.tangem.features.send.v2.api.subcomponents.notifications.SendNotificationsUpdateTrigger -import com.tangem.features.send.v2.common.CommonSendRoute -import com.tangem.features.send.v2.common.SendBalanceUpdater -import com.tangem.features.send.v2.common.SendConfirmAlertFactory -import com.tangem.features.send.v2.common.ui.state.ConfirmUM -import com.tangem.features.send.v2.impl.R -import com.tangem.features.send.v2.sendnft.analytics.NFTSendAnalyticHelper -import com.tangem.features.send.v2.sendnft.confirm.NFTSendConfirmComponent -import com.tangem.features.send.v2.sendnft.confirm.model.transformers.NFTSendConfirmInitialStateTransformer -import com.tangem.features.send.v2.sendnft.confirm.model.transformers.NFTSendConfirmSendingStateTransformer -import com.tangem.features.send.v2.sendnft.confirm.model.transformers.NFTSendConfirmationNotificationsTransformerV2 -import com.tangem.features.send.v2.sendnft.ui.state.NFTSendUM +import com.tangem.features.send.api.SendNotificationsComponent +import com.tangem.features.send.api.SendNotificationsComponent.Params.NotificationData +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents.SendScreenSource +import com.tangem.features.send.api.callbacks.FeeSelectorModelCallback +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationUM +import com.tangem.features.send.api.subcomponents.feeSelector.FeeSelectorCheckReloadListener +import com.tangem.features.send.api.subcomponents.feeSelector.FeeSelectorCheckReloadTrigger +import com.tangem.features.send.api.subcomponents.feeSelector.FeeSelectorReloadTrigger +import com.tangem.features.send.api.subcomponents.notifications.SendNotificationsUpdateListener +import com.tangem.features.send.api.subcomponents.notifications.SendNotificationsUpdateTrigger +import com.tangem.features.send.common.CommonSendRoute +import com.tangem.features.send.common.SendBalanceUpdater +import com.tangem.features.send.common.SendConfirmAlertFactory +import com.tangem.features.send.common.ui.state.ConfirmUM +import com.tangem.features.send.sendnft.analytics.NFTSendAnalyticHelper +import com.tangem.features.send.sendnft.confirm.NFTSendConfirmComponent +import com.tangem.features.send.sendnft.confirm.model.transformers.NFTSendConfirmInitialStateTransformer +import com.tangem.features.send.sendnft.confirm.model.transformers.NFTSendConfirmSendingStateTransformer +import com.tangem.features.send.sendnft.confirm.model.transformers.NFTSendConfirmationNotificationsTransformerV2 +import com.tangem.features.send.sendnft.ui.state.NFTSendUM +import com.tangem.features.send.impl.R import com.tangem.utils.coroutines.CoroutineDispatcherProvider import com.tangem.utils.extensions.stripZeroPlainString import com.tangem.utils.logging.TangemLogger @@ -62,7 +62,7 @@ import kotlinx.coroutines.flow.* import kotlinx.coroutines.launch import java.math.BigDecimal import javax.inject.Inject -import com.tangem.features.send.v2.api.entity.FeeSelectorUM as FeeSelectorUMRedesigned +import com.tangem.features.send.api.entity.FeeSelectorUM as FeeSelectorUMRedesigned @Suppress("LongParameterList", "LargeClass") @ModelScoped diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/model/NFTSendConfirmSentStateTransformer.kt b/features/send/impl/src/main/java/com/tangem/features/send/sendnft/confirm/model/NFTSendConfirmSentStateTransformer.kt similarity index 75% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/model/NFTSendConfirmSentStateTransformer.kt rename to features/send/impl/src/main/java/com/tangem/features/send/sendnft/confirm/model/NFTSendConfirmSentStateTransformer.kt index 5c613e80e6..83a517b7c6 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/model/NFTSendConfirmSentStateTransformer.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/sendnft/confirm/model/NFTSendConfirmSentStateTransformer.kt @@ -1,8 +1,8 @@ -package com.tangem.features.send.v2.sendnft.confirm.model +package com.tangem.features.send.sendnft.confirm.model import com.tangem.blockchain.common.TransactionData -import com.tangem.features.send.v2.common.ui.state.ConfirmUM -import com.tangem.features.send.v2.sendnft.ui.state.NFTSendUM +import com.tangem.features.send.common.ui.state.ConfirmUM +import com.tangem.features.send.sendnft.ui.state.NFTSendUM import com.tangem.utils.transformer.Transformer internal class NFTSendConfirmSentStateTransformer( diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/model/transformers/NFTSendConfirmInitialStateTransformer.kt b/features/send/impl/src/main/java/com/tangem/features/send/sendnft/confirm/model/transformers/NFTSendConfirmInitialStateTransformer.kt similarity index 82% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/model/transformers/NFTSendConfirmInitialStateTransformer.kt rename to features/send/impl/src/main/java/com/tangem/features/send/sendnft/confirm/model/transformers/NFTSendConfirmInitialStateTransformer.kt index de24a6a022..33690e9159 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/model/transformers/NFTSendConfirmInitialStateTransformer.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/sendnft/confirm/model/transformers/NFTSendConfirmInitialStateTransformer.kt @@ -1,7 +1,7 @@ -package com.tangem.features.send.v2.sendnft.confirm.model.transformers +package com.tangem.features.send.sendnft.confirm.model.transformers import com.tangem.core.ui.extensions.TextReference -import com.tangem.features.send.v2.common.ui.state.ConfirmUM +import com.tangem.features.send.common.ui.state.ConfirmUM import com.tangem.utils.transformer.Transformer import kotlinx.collections.immutable.persistentListOf diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/model/transformers/NFTSendConfirmSendingStateTransformer.kt b/features/send/impl/src/main/java/com/tangem/features/send/sendnft/confirm/model/transformers/NFTSendConfirmSendingStateTransformer.kt similarity index 72% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/model/transformers/NFTSendConfirmSendingStateTransformer.kt rename to features/send/impl/src/main/java/com/tangem/features/send/sendnft/confirm/model/transformers/NFTSendConfirmSendingStateTransformer.kt index 7b96c1a703..337820fd39 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/model/transformers/NFTSendConfirmSendingStateTransformer.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/sendnft/confirm/model/transformers/NFTSendConfirmSendingStateTransformer.kt @@ -1,7 +1,7 @@ -package com.tangem.features.send.v2.sendnft.confirm.model.transformers +package com.tangem.features.send.sendnft.confirm.model.transformers -import com.tangem.features.send.v2.common.ui.state.ConfirmUM -import com.tangem.features.send.v2.sendnft.ui.state.NFTSendUM +import com.tangem.features.send.common.ui.state.ConfirmUM +import com.tangem.features.send.sendnft.ui.state.NFTSendUM import com.tangem.utils.transformer.Transformer internal class NFTSendConfirmSendingStateTransformer( diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/model/transformers/NFTSendConfirmationNotificationsTransformerV2.kt b/features/send/impl/src/main/java/com/tangem/features/send/sendnft/confirm/model/transformers/NFTSendConfirmationNotificationsTransformerV2.kt similarity index 86% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/model/transformers/NFTSendConfirmationNotificationsTransformerV2.kt rename to features/send/impl/src/main/java/com/tangem/features/send/sendnft/confirm/model/transformers/NFTSendConfirmationNotificationsTransformerV2.kt index 2aeb3ab7e0..9a209b8edf 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/model/transformers/NFTSendConfirmationNotificationsTransformerV2.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/sendnft/confirm/model/transformers/NFTSendConfirmationNotificationsTransformerV2.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.sendnft.confirm.model.transformers +package com.tangem.features.send.sendnft.confirm.model.transformers import com.tangem.blockchain.common.transaction.Fee import com.tangem.common.ui.notifications.NotificationUM @@ -8,13 +8,13 @@ import com.tangem.core.ui.extensions.resourceReference import com.tangem.core.ui.extensions.wrappedList import com.tangem.domain.appcurrency.model.AppCurrency import com.tangem.domain.models.currency.CryptoCurrency -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents -import com.tangem.features.send.v2.api.entity.FeeSelectorUM -import com.tangem.features.send.v2.api.subcomponents.feeSelector.utils.FeeCalculationUtils -import com.tangem.features.send.v2.api.utils.formatFooterFiatFee -import com.tangem.features.send.v2.api.utils.getTronTokenFeeSendingText -import com.tangem.features.send.v2.common.ui.state.ConfirmUM -import com.tangem.features.send.v2.impl.R +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.api.subcomponents.feeSelector.utils.FeeCalculationUtils +import com.tangem.features.send.api.utils.formatFooterFiatFee +import com.tangem.features.send.api.utils.getTronTokenFeeSendingText +import com.tangem.features.send.common.ui.state.ConfirmUM +import com.tangem.features.send.impl.R import com.tangem.utils.transformer.Transformer import kotlinx.collections.immutable.toPersistentList diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/ui/NFTSendConfirmContent.kt b/features/send/impl/src/main/java/com/tangem/features/send/sendnft/confirm/ui/NFTSendConfirmContent.kt similarity index 82% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/ui/NFTSendConfirmContent.kt rename to features/send/impl/src/main/java/com/tangem/features/send/sendnft/confirm/ui/NFTSendConfirmContent.kt index c950a991ae..867d877dc6 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/ui/NFTSendConfirmContent.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/sendnft/confirm/ui/NFTSendConfirmContent.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.sendnft.confirm.ui +package com.tangem.features.send.sendnft.confirm.ui import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement @@ -13,13 +13,13 @@ import androidx.compose.ui.unit.dp import com.tangem.common.ui.notifications.NotificationUM import com.tangem.core.ui.res.TangemTheme import com.tangem.features.nft.component.NFTDetailsBlockComponent -import com.tangem.features.send.v2.api.FeeSelectorBlockComponent -import com.tangem.features.send.v2.common.ui.state.ConfirmUM -import com.tangem.features.send.v2.common.ui.tapHelp -import com.tangem.features.send.v2.sendnft.ui.state.NFTSendUM -import com.tangem.features.send.v2.subcomponents.destination.DefaultSendDestinationBlockComponent -import com.tangem.features.send.v2.subcomponents.notifications -import com.tangem.features.send.v2.subcomponents.notifications.DefaultSendNotificationsComponent +import com.tangem.features.send.api.FeeSelectorBlockComponent +import com.tangem.features.send.common.ui.state.ConfirmUM +import com.tangem.features.send.common.ui.tapHelp +import com.tangem.features.send.sendnft.ui.state.NFTSendUM +import com.tangem.features.send.subcomponents.destination.DefaultSendDestinationBlockComponent +import com.tangem.features.send.subcomponents.notifications +import com.tangem.features.send.subcomponents.notifications.DefaultSendNotificationsComponent import kotlinx.collections.immutable.ImmutableList private const val BLOCKS_KEY = "BLOCKS_KEY" diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/di/NFTSendModelModule.kt b/features/send/impl/src/main/java/com/tangem/features/send/sendnft/di/NFTSendModelModule.kt similarity index 73% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/di/NFTSendModelModule.kt rename to features/send/impl/src/main/java/com/tangem/features/send/sendnft/di/NFTSendModelModule.kt index 5980fa7d22..ef2676cbf6 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/di/NFTSendModelModule.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/sendnft/di/NFTSendModelModule.kt @@ -1,10 +1,10 @@ -package com.tangem.features.send.v2.sendnft.di +package com.tangem.features.send.sendnft.di import com.tangem.core.decompose.di.ModelComponent import com.tangem.core.decompose.model.Model -import com.tangem.features.send.v2.sendnft.confirm.model.NFTSendConfirmModel -import com.tangem.features.send.v2.sendnft.model.NFTSendModel -import com.tangem.features.send.v2.sendnft.success.model.NFTSendSuccessModel +import com.tangem.features.send.sendnft.confirm.model.NFTSendConfirmModel +import com.tangem.features.send.sendnft.model.NFTSendModel +import com.tangem.features.send.sendnft.success.model.NFTSendSuccessModel import dagger.Binds import dagger.Module import dagger.hilt.InstallIn diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/model/NFTSendModel.kt b/features/send/impl/src/main/java/com/tangem/features/send/sendnft/model/NFTSendModel.kt similarity index 89% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/model/NFTSendModel.kt rename to features/send/impl/src/main/java/com/tangem/features/send/sendnft/model/NFTSendModel.kt index 3d7216fc41..e4069a5e5e 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/model/NFTSendModel.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/sendnft/model/NFTSendModel.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.sendnft.model +package com.tangem.features.send.sendnft.model import androidx.compose.runtime.Stable import arrow.core.Either @@ -35,17 +35,16 @@ import com.tangem.domain.transaction.usecase.CreateNFTTransferTransactionUseCase import com.tangem.domain.transaction.usecase.GetFeeUseCase import com.tangem.domain.wallets.usecase.GetUserWalletUseCase import com.tangem.features.nft.entity.NFTSendSuccessTrigger -import com.tangem.features.send.v2.api.NFTSendComponent -import com.tangem.features.send.v2.api.entity.FeeSelectorUM -import com.tangem.features.send.v2.api.subcomponents.destination.SendDestinationComponent -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationUM -import com.tangem.features.send.v2.common.CommonSendRoute -import com.tangem.features.send.v2.common.CommonSendRoute.* -import com.tangem.features.send.v2.common.SendConfirmAlertFactory -import com.tangem.features.send.v2.common.ui.state.ConfirmUM -import com.tangem.features.send.v2.sendnft.confirm.NFTSendConfirmComponent -import com.tangem.features.send.v2.sendnft.success.NFTSendSuccessComponent -import com.tangem.features.send.v2.sendnft.ui.state.NFTSendUM +import com.tangem.features.send.api.NFTSendComponent +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.api.subcomponents.destination.SendDestinationComponent +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationUM +import com.tangem.features.send.common.CommonSendRoute +import com.tangem.features.send.common.SendConfirmAlertFactory +import com.tangem.features.send.common.ui.state.ConfirmUM +import com.tangem.features.send.sendnft.confirm.NFTSendConfirmComponent +import com.tangem.features.send.sendnft.success.NFTSendSuccessComponent +import com.tangem.features.send.sendnft.ui.state.NFTSendUM import com.tangem.utils.coroutines.CoroutineDispatcherProvider import kotlinx.coroutines.flow.* import kotlinx.coroutines.launch @@ -81,7 +80,7 @@ internal class NFTSendModel @Inject constructor( val params: NFTSendComponent.Params = paramsContainer.require() - val initialRoute = Empty + val initialRoute = CommonSendRoute.Empty val currentRouteFlow = MutableStateFlow(initialRoute) @@ -121,7 +120,7 @@ internal class NFTSendModel @Inject constructor( } override fun onBackClick() { - if (currentRouteFlow.value == ConfirmSuccess) { + if (currentRouteFlow.value == CommonSendRoute.ConfirmSuccess) { modelScope.launch { nftSendSuccessTrigger.triggerSuccessNFTSend() } @@ -134,8 +133,8 @@ internal class NFTSendModel @Inject constructor( onBackClick() } else { when (currentRouteFlow.value) { - is Destination -> router.push(Confirm) - Confirm -> router.replaceAll(ConfirmSuccess) + is CommonSendRoute.Destination -> router.push(CommonSendRoute.Confirm) + CommonSendRoute.Confirm -> router.replaceAll(CommonSendRoute.ConfirmSuccess) else -> onBackClick() } } @@ -199,7 +198,7 @@ internal class NFTSendModel @Inject constructor( ).getOrNull() ?: cryptoStatus if (uiState.value.destinationUM is DestinationUM.Empty) { - router.replaceAll(Destination(isEditMode = false)) + router.replaceAll(CommonSendRoute.Destination(isEditMode = false)) } }.flowOn(dispatchers.default) .launchIn(modelScope) diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/success/NFTSendSuccessComponent.kt b/features/send/impl/src/main/java/com/tangem/features/send/sendnft/success/NFTSendSuccessComponent.kt similarity index 84% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/success/NFTSendSuccessComponent.kt rename to features/send/impl/src/main/java/com/tangem/features/send/sendnft/success/NFTSendSuccessComponent.kt index 59f31637b6..48dca29d62 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/success/NFTSendSuccessComponent.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/sendnft/success/NFTSendSuccessComponent.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.sendnft.success +package com.tangem.features.send.sendnft.success import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue @@ -15,15 +15,15 @@ import com.tangem.domain.models.currency.CryptoCurrencyStatus import com.tangem.domain.models.wallet.UserWallet import com.tangem.domain.nft.models.NFTAsset import com.tangem.features.nft.component.NFTDetailsBlockComponent -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents -import com.tangem.features.send.v2.api.entity.PredefinedValues -import com.tangem.features.send.v2.api.subcomponents.destination.SendDestinationBlockComponent -import com.tangem.features.send.v2.api.subcomponents.destination.SendDestinationComponentParams.DestinationBlockParams -import com.tangem.features.send.v2.common.CommonSendRoute -import com.tangem.features.send.v2.impl.R -import com.tangem.features.send.v2.sendnft.success.model.NFTSendSuccessModel -import com.tangem.features.send.v2.sendnft.success.ui.NFTSendSuccessContent -import com.tangem.features.send.v2.sendnft.ui.state.NFTSendUM +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents +import com.tangem.features.send.api.entity.PredefinedValues +import com.tangem.features.send.api.subcomponents.destination.SendDestinationBlockComponent +import com.tangem.features.send.api.subcomponents.destination.SendDestinationComponentParams.DestinationBlockParams +import com.tangem.features.send.common.CommonSendRoute +import com.tangem.features.send.sendnft.success.model.NFTSendSuccessModel +import com.tangem.features.send.sendnft.success.ui.NFTSendSuccessContent +import com.tangem.features.send.sendnft.ui.state.NFTSendUM +import com.tangem.features.send.impl.R import dagger.assisted.Assisted import dagger.assisted.AssistedFactory import dagger.assisted.AssistedInject diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/success/model/NFTSendSuccessModel.kt b/features/send/impl/src/main/java/com/tangem/features/send/sendnft/success/model/NFTSendSuccessModel.kt similarity index 91% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/success/model/NFTSendSuccessModel.kt rename to features/send/impl/src/main/java/com/tangem/features/send/sendnft/success/model/NFTSendSuccessModel.kt index 11ee295245..5c9061f7f8 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/success/model/NFTSendSuccessModel.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/sendnft/success/model/NFTSendSuccessModel.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.sendnft.success.model +package com.tangem.features.send.sendnft.success.model import androidx.compose.runtime.Stable import com.tangem.common.ui.navigationButtons.NavigationButton @@ -11,12 +11,12 @@ import com.tangem.core.navigation.share.ShareManager import com.tangem.core.navigation.url.UrlOpener import com.tangem.core.ui.extensions.resourceReference import com.tangem.core.ui.extensions.stringReference -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents.SendScreenSource -import com.tangem.features.send.v2.common.CommonSendRoute -import com.tangem.features.send.v2.impl.R -import com.tangem.features.send.v2.send.ui.state.SendUM -import com.tangem.features.send.v2.sendnft.success.NFTSendSuccessComponent +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents.SendScreenSource +import com.tangem.features.send.common.CommonSendRoute +import com.tangem.features.send.send.ui.state.SendUM +import com.tangem.features.send.sendnft.success.NFTSendSuccessComponent +import com.tangem.features.send.impl.R import com.tangem.utils.coroutines.CoroutineDispatcherProvider import kotlinx.coroutines.flow.combine import kotlinx.coroutines.flow.filter diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/success/ui/NFTSendSuccessContent.kt b/features/send/impl/src/main/java/com/tangem/features/send/sendnft/success/ui/NFTSendSuccessContent.kt similarity index 91% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/success/ui/NFTSendSuccessContent.kt rename to features/send/impl/src/main/java/com/tangem/features/send/sendnft/success/ui/NFTSendSuccessContent.kt index 2f18427779..aa4bd4ceff 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/success/ui/NFTSendSuccessContent.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/sendnft/success/ui/NFTSendSuccessContent.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.sendnft.success.ui +package com.tangem.features.send.sendnft.success.ui import androidx.compose.animation.* import androidx.compose.foundation.background @@ -20,11 +20,11 @@ import com.tangem.core.ui.utils.DateTimeFormatters import com.tangem.core.ui.utils.toPx import com.tangem.core.ui.utils.toTimeFormat import com.tangem.features.nft.component.NFTDetailsBlockComponent -import com.tangem.features.send.v2.api.subcomponents.destination.SendDestinationBlockComponent -import com.tangem.features.send.v2.common.ui.FeeBlockSuccess -import com.tangem.features.send.v2.common.ui.state.ConfirmUM -import com.tangem.features.send.v2.impl.R -import com.tangem.features.send.v2.sendnft.ui.state.NFTSendUM +import com.tangem.features.send.api.subcomponents.destination.SendDestinationBlockComponent +import com.tangem.features.send.common.ui.FeeBlockSuccess +import com.tangem.features.send.common.ui.state.ConfirmUM +import com.tangem.features.send.sendnft.ui.state.NFTSendUM +import com.tangem.features.send.impl.R import kotlinx.coroutines.delay @Composable diff --git a/features/send/impl/src/main/java/com/tangem/features/send/sendnft/ui/state/NFTSendUM.kt b/features/send/impl/src/main/java/com/tangem/features/send/sendnft/ui/state/NFTSendUM.kt new file mode 100644 index 0000000000..e81c5a16b9 --- /dev/null +++ b/features/send/impl/src/main/java/com/tangem/features/send/sendnft/ui/state/NFTSendUM.kt @@ -0,0 +1,13 @@ +package com.tangem.features.send.sendnft.ui.state + +import com.tangem.common.ui.navigationButtons.NavigationUM +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationUM +import com.tangem.features.send.common.ui.state.ConfirmUM + +internal data class NFTSendUM( + val destinationUM: DestinationUM, + val feeSelectorUM: FeeSelectorUM, + val confirmUM: ConfirmUM, + val navigationUM: NavigationUM, +) \ No newline at end of file diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/Notifications.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/Notifications.kt similarity index 97% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/Notifications.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/Notifications.kt index 4704183c22..f725147842 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/Notifications.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/Notifications.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.subcomponents +package com.tangem.features.send.subcomponents import androidx.compose.foundation.layout.padding import androidx.compose.foundation.lazy.LazyListScope diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/SendAmountBlockComponent.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/amount/SendAmountBlockComponent.kt similarity index 81% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/SendAmountBlockComponent.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/amount/SendAmountBlockComponent.kt index 5226c68467..bb842f8b59 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/SendAmountBlockComponent.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/amount/SendAmountBlockComponent.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.subcomponents.amount +package com.tangem.features.send.subcomponents.amount import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue @@ -9,15 +9,14 @@ import com.tangem.common.ui.amountScreen.ui.AmountBlockV2 import com.tangem.core.decompose.context.AppComponentContext import com.tangem.core.decompose.model.getOrCreateModel import com.tangem.core.ui.decompose.ComposableContentComponent -import com.tangem.features.send.v2.api.entity.PredefinedValues -import com.tangem.features.send.v2.subcomponents.amount.SendAmountComponentParams.AmountBlockParams -import com.tangem.features.send.v2.subcomponents.amount.model.SendAmountModel +import com.tangem.features.send.api.entity.PredefinedValues +import com.tangem.features.send.subcomponents.amount.model.SendAmountModel import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.onEach internal class SendAmountBlockComponent( appComponentContext: AppComponentContext, - private val params: AmountBlockParams, + private val params: SendAmountComponentParams.AmountBlockParams, val onResult: (AmountState) -> Unit, val onClick: () -> Unit, ) : ComposableContentComponent, AppComponentContext by appComponentContext { diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/SendAmountComponent.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/amount/SendAmountComponent.kt similarity index 82% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/SendAmountComponent.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/amount/SendAmountComponent.kt index acae2c05d8..b86140b9db 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/SendAmountComponent.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/amount/SendAmountComponent.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.subcomponents.amount +package com.tangem.features.send.subcomponents.amount import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue @@ -10,13 +10,12 @@ import com.tangem.core.decompose.context.AppComponentContext import com.tangem.core.decompose.model.getOrCreateModel import com.tangem.core.ui.decompose.ComposableContentComponent import com.tangem.domain.wallets.models.GetUserWalletError -import com.tangem.features.send.v2.subcomponents.amount.SendAmountComponentParams.AmountParams -import com.tangem.features.send.v2.subcomponents.amount.model.SendAmountModel -import com.tangem.features.send.v2.subcomponents.amount.ui.SendAmountContent +import com.tangem.features.send.subcomponents.amount.model.SendAmountModel +import com.tangem.features.send.subcomponents.amount.ui.SendAmountContent internal class SendAmountComponent( appComponentContext: AppComponentContext, - private val params: AmountParams, + private val params: SendAmountComponentParams.AmountParams, ) : ComposableContentComponent, AppComponentContext by appComponentContext { private val model: SendAmountModel = getOrCreateModel(params = params) diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/SendAmountComponentParams.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/amount/SendAmountComponentParams.kt similarity index 87% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/SendAmountComponentParams.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/amount/SendAmountComponentParams.kt index 73eac2a41a..88427bed4c 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/SendAmountComponentParams.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/amount/SendAmountComponentParams.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.subcomponents.amount +package com.tangem.features.send.subcomponents.amount import com.tangem.common.ui.amountScreen.models.AmountState import com.tangem.domain.appcurrency.model.AppCurrency @@ -7,10 +7,9 @@ import com.tangem.domain.models.currency.CryptoCurrency import com.tangem.domain.models.currency.CryptoCurrencyStatus import com.tangem.domain.models.wallet.UserWallet import com.tangem.domain.models.wallet.UserWalletId -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents -import com.tangem.features.send.v2.api.entity.PredefinedValues -import com.tangem.features.send.v2.common.CommonSendRoute -import com.tangem.features.send.v2.subcomponents.amount.SendAmountComponent.ModelCallback +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents +import com.tangem.features.send.api.entity.PredefinedValues +import com.tangem.features.send.common.CommonSendRoute import kotlinx.coroutines.flow.StateFlow internal sealed class SendAmountComponentParams { @@ -39,7 +38,7 @@ internal sealed class SendAmountComponentParams { override val analyticsSendSource: CommonSendAnalyticEvents.CommonSendSource, override val accountFlow: StateFlow, override val isAccountModeFlow: StateFlow, - val callback: ModelCallback, + val callback: SendAmountComponent.ModelCallback, val currentRoute: StateFlow, ) : SendAmountComponentParams() diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/SendAmountReduceTrigger.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/amount/SendAmountReduceTrigger.kt similarity index 97% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/SendAmountReduceTrigger.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/amount/SendAmountReduceTrigger.kt index d3085ff9a2..fab7f0ba43 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/SendAmountReduceTrigger.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/amount/SendAmountReduceTrigger.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.subcomponents.amount +package com.tangem.features.send.subcomponents.amount import com.tangem.common.ui.amountScreen.converters.AmountReduceByTransformer.ReduceByData import kotlinx.coroutines.flow.Flow diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/di/SendAmountModule.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/amount/di/SendAmountModule.kt similarity index 62% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/di/SendAmountModule.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/amount/di/SendAmountModule.kt index b4c6e1b324..644c391e76 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/di/SendAmountModule.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/amount/di/SendAmountModule.kt @@ -1,6 +1,10 @@ -package com.tangem.features.send.v2.subcomponents.amount.di +package com.tangem.features.send.subcomponents.amount.di -import com.tangem.features.send.v2.subcomponents.amount.* +import com.tangem.features.send.subcomponents.amount.DefaultSendAmountReduceTrigger +import com.tangem.features.send.subcomponents.amount.SendAmountReduceListener +import com.tangem.features.send.subcomponents.amount.SendAmountReduceTrigger +import com.tangem.features.send.subcomponents.amount.SendAmountUpdateListener +import com.tangem.features.send.subcomponents.amount.SendAmountUpdateTrigger import dagger.Binds import dagger.Module import dagger.hilt.InstallIn diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/model/SendAmountAlertFactory.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/amount/model/SendAmountAlertFactory.kt similarity index 92% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/model/SendAmountAlertFactory.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/amount/model/SendAmountAlertFactory.kt index f4373fe4b9..647cf1ecf3 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/model/SendAmountAlertFactory.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/amount/model/SendAmountAlertFactory.kt @@ -1,11 +1,11 @@ -package com.tangem.features.send.v2.subcomponents.amount.model +package com.tangem.features.send.subcomponents.amount.model import com.tangem.core.decompose.di.ModelScoped import com.tangem.core.decompose.ui.UiMessageSender import com.tangem.core.ui.extensions.resourceReference import com.tangem.core.ui.message.DialogMessage import com.tangem.core.ui.message.EventMessageAction -import com.tangem.features.send.v2.impl.R +import com.tangem.features.send.impl.R import javax.inject.Inject @ModelScoped diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/model/SendAmountClickIntents.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/amount/model/SendAmountClickIntents.kt similarity index 72% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/model/SendAmountClickIntents.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/amount/model/SendAmountClickIntents.kt index a97d8b6ec3..a138632a29 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/model/SendAmountClickIntents.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/amount/model/SendAmountClickIntents.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.subcomponents.amount.model +package com.tangem.features.send.subcomponents.amount.model import com.tangem.common.ui.amountScreen.AmountScreenClickIntents diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/model/SendAmountModel.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/amount/model/SendAmountModel.kt similarity index 95% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/model/SendAmountModel.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/amount/model/SendAmountModel.kt index 7057fd13d9..bd11a2fc81 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/model/SendAmountModel.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/amount/model/SendAmountModel.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.subcomponents.amount.model +package com.tangem.features.send.subcomponents.amount.model import androidx.compose.runtime.Stable import arrow.core.getOrElse @@ -27,16 +27,16 @@ import com.tangem.domain.models.wallet.isMultiCurrency import com.tangem.domain.tokens.GetMinimumTransactionAmountSyncUseCase import com.tangem.domain.wallets.usecase.GetUserWalletUseCase import com.tangem.domain.wallets.usecase.GetWalletsUseCase -import com.tangem.features.send.v2.api.entity.PredefinedValues -import com.tangem.features.send.v2.api.entity.isFromMainScreenQr -import com.tangem.features.send.v2.api.subcomponents.amount.analytics.CommonSendAmountAnalyticEvents -import com.tangem.features.send.v2.api.subcomponents.amount.analytics.CommonSendAmountAnalyticEvents.SelectedCurrencyType -import com.tangem.features.send.v2.api.subcomponents.feeSelector.FeeSelectorReloadTrigger -import com.tangem.features.send.v2.common.CommonSendRoute -import com.tangem.features.send.v2.impl.R -import com.tangem.features.send.v2.subcomponents.amount.SendAmountComponentParams -import com.tangem.features.send.v2.subcomponents.amount.SendAmountReduceListener -import com.tangem.features.send.v2.subcomponents.amount.SendAmountUpdateListener +import com.tangem.features.send.api.entity.PredefinedValues +import com.tangem.features.send.api.entity.isFromMainScreenQr +import com.tangem.features.send.api.subcomponents.amount.analytics.CommonSendAmountAnalyticEvents +import com.tangem.features.send.api.subcomponents.amount.analytics.CommonSendAmountAnalyticEvents.SelectedCurrencyType +import com.tangem.features.send.api.subcomponents.feeSelector.FeeSelectorReloadTrigger +import com.tangem.features.send.common.CommonSendRoute +import com.tangem.features.send.subcomponents.amount.SendAmountComponentParams +import com.tangem.features.send.subcomponents.amount.SendAmountReduceListener +import com.tangem.features.send.subcomponents.amount.SendAmountUpdateListener +import com.tangem.features.send.impl.R import com.tangem.utils.coroutines.CoroutineDispatcherProvider import com.tangem.utils.extensions.orZero import com.tangem.utils.isNullOrZero diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/ui/SendAmountContent.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/amount/ui/SendAmountContent.kt similarity index 93% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/ui/SendAmountContent.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/amount/ui/SendAmountContent.kt index d0a645e42f..bcd2557e2f 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/ui/SendAmountContent.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/amount/ui/SendAmountContent.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.subcomponents.amount.ui +package com.tangem.features.send.subcomponents.amount.ui import android.content.res.Configuration import androidx.compose.foundation.background @@ -25,9 +25,9 @@ import com.tangem.core.ui.extensions.stringResourceSafe import com.tangem.core.ui.res.TangemTheme import com.tangem.core.ui.res.TangemThemePreview import com.tangem.core.ui.test.SendScreenTestTags -import com.tangem.features.send.v2.impl.R -import com.tangem.features.send.v2.subcomponents.amount.model.SendAmountClickIntents -import com.tangem.features.send.v2.subcomponents.amount.ui.preview.SendAmountClickIntentsStub +import com.tangem.features.send.subcomponents.amount.model.SendAmountClickIntents +import com.tangem.features.send.subcomponents.amount.ui.preview.SendAmountClickIntentsStub +import com.tangem.features.send.impl.R @Composable fun SendAmountContent( diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/ui/preview/SendAmountClickIntentsStub.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/amount/ui/preview/SendAmountClickIntentsStub.kt similarity index 70% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/ui/preview/SendAmountClickIntentsStub.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/amount/ui/preview/SendAmountClickIntentsStub.kt index 8c6673d5cb..a26772a3ad 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/ui/preview/SendAmountClickIntentsStub.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/amount/ui/preview/SendAmountClickIntentsStub.kt @@ -1,6 +1,6 @@ -package com.tangem.features.send.v2.subcomponents.amount.ui.preview +package com.tangem.features.send.subcomponents.amount.ui.preview -import com.tangem.features.send.v2.subcomponents.amount.model.SendAmountClickIntents +import com.tangem.features.send.subcomponents.amount.model.SendAmountClickIntents internal object SendAmountClickIntentsStub : SendAmountClickIntents { override fun onConvertToAnotherToken() {} diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/DefaultSendDestinationBlockComponent.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/DefaultSendDestinationBlockComponent.kt similarity index 77% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/DefaultSendDestinationBlockComponent.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/DefaultSendDestinationBlockComponent.kt index 05767a931c..90df4644fb 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/DefaultSendDestinationBlockComponent.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/DefaultSendDestinationBlockComponent.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.subcomponents.destination +package com.tangem.features.send.subcomponents.destination import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue @@ -6,12 +6,12 @@ import androidx.compose.ui.Modifier import androidx.lifecycle.compose.collectAsStateWithLifecycle import com.tangem.core.decompose.context.AppComponentContext import com.tangem.core.decompose.model.getOrCreateModel -import com.tangem.features.send.v2.api.entity.PredefinedValues -import com.tangem.features.send.v2.api.subcomponents.destination.SendDestinationBlockComponent -import com.tangem.features.send.v2.api.subcomponents.destination.SendDestinationComponentParams -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationUM -import com.tangem.features.send.v2.subcomponents.destination.model.SendDestinationModel -import com.tangem.features.send.v2.subcomponents.destination.ui.DestinationBlock +import com.tangem.features.send.api.entity.PredefinedValues +import com.tangem.features.send.api.subcomponents.destination.SendDestinationBlockComponent +import com.tangem.features.send.api.subcomponents.destination.SendDestinationComponentParams +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationUM +import com.tangem.features.send.subcomponents.destination.model.SendDestinationModel +import com.tangem.features.send.subcomponents.destination.ui.DestinationBlock import dagger.assisted.Assisted import dagger.assisted.AssistedFactory import dagger.assisted.AssistedInject diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/DefaultSendDestinationComponent.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/DefaultSendDestinationComponent.kt similarity index 74% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/DefaultSendDestinationComponent.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/DefaultSendDestinationComponent.kt index ea22acb5bd..d798a85168 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/DefaultSendDestinationComponent.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/DefaultSendDestinationComponent.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.subcomponents.destination +package com.tangem.features.send.subcomponents.destination import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue @@ -6,11 +6,11 @@ import androidx.compose.ui.Modifier import androidx.lifecycle.compose.collectAsStateWithLifecycle import com.tangem.core.decompose.context.AppComponentContext import com.tangem.core.decompose.model.getOrCreateModel -import com.tangem.features.send.v2.api.subcomponents.destination.SendDestinationComponent -import com.tangem.features.send.v2.api.subcomponents.destination.SendDestinationComponentParams -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationUM -import com.tangem.features.send.v2.subcomponents.destination.model.SendDestinationModel -import com.tangem.features.send.v2.subcomponents.destination.ui.SendDestinationContent +import com.tangem.features.send.api.subcomponents.destination.SendDestinationComponent +import com.tangem.features.send.api.subcomponents.destination.SendDestinationComponentParams +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationUM +import com.tangem.features.send.subcomponents.destination.model.SendDestinationModel +import com.tangem.features.send.subcomponents.destination.ui.SendDestinationContent import dagger.assisted.Assisted import dagger.assisted.AssistedFactory import dagger.assisted.AssistedInject diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/SendDestinationAlertFactory.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/SendDestinationAlertFactory.kt similarity index 89% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/SendDestinationAlertFactory.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/SendDestinationAlertFactory.kt index ed46533724..bc14f3802d 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/SendDestinationAlertFactory.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/SendDestinationAlertFactory.kt @@ -1,11 +1,11 @@ -package com.tangem.features.send.v2.subcomponents.destination +package com.tangem.features.send.subcomponents.destination import com.tangem.core.decompose.di.ModelScoped import com.tangem.core.decompose.ui.UiMessageSender import com.tangem.core.ui.extensions.resourceReference import com.tangem.core.ui.message.DialogMessage import com.tangem.core.ui.message.EventMessageAction -import com.tangem.features.send.v2.impl.R +import com.tangem.features.send.impl.R import javax.inject.Inject @ModelScoped diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/analytics/EnterAddressSource.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/analytics/EnterAddressSource.kt similarity index 79% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/analytics/EnterAddressSource.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/analytics/EnterAddressSource.kt index 7dc514bb33..911f500009 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/analytics/EnterAddressSource.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/analytics/EnterAddressSource.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.subcomponents.destination.analytics +package com.tangem.features.send.subcomponents.destination.analytics internal enum class EnterAddressSource { QRCode, diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/analytics/SendDestinationAnalyticEvents.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/analytics/SendDestinationAnalyticEvents.kt similarity index 89% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/analytics/SendDestinationAnalyticEvents.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/analytics/SendDestinationAnalyticEvents.kt index 2907e373d7..54bb10849d 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/analytics/SendDestinationAnalyticEvents.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/analytics/SendDestinationAnalyticEvents.kt @@ -1,9 +1,9 @@ -package com.tangem.features.send.v2.subcomponents.destination.analytics +package com.tangem.features.send.subcomponents.destination.analytics import com.tangem.core.analytics.models.AnalyticsEvent import com.tangem.core.analytics.models.AnalyticsParam.Key.SOURCE import com.tangem.core.analytics.models.AnalyticsParam.Key.VALIDATION -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents internal sealed class SendDestinationAnalyticEvents( category: String, diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/di/SendDestinationModule.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/di/SendDestinationModule.kt similarity index 57% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/di/SendDestinationModule.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/di/SendDestinationModule.kt index a95d5d43ab..2269b4fd92 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/di/SendDestinationModule.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/di/SendDestinationModule.kt @@ -1,9 +1,9 @@ -package com.tangem.features.send.v2.subcomponents.destination.di +package com.tangem.features.send.subcomponents.destination.di -import com.tangem.features.send.v2.api.subcomponents.destination.SendDestinationBlockComponent -import com.tangem.features.send.v2.api.subcomponents.destination.SendDestinationComponent -import com.tangem.features.send.v2.subcomponents.destination.DefaultSendDestinationBlockComponent -import com.tangem.features.send.v2.subcomponents.destination.DefaultSendDestinationComponent +import com.tangem.features.send.api.subcomponents.destination.SendDestinationBlockComponent +import com.tangem.features.send.api.subcomponents.destination.SendDestinationComponent +import com.tangem.features.send.subcomponents.destination.DefaultSendDestinationBlockComponent +import com.tangem.features.send.subcomponents.destination.DefaultSendDestinationComponent import dagger.Binds import dagger.Module import dagger.hilt.InstallIn diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/SendDestinationClickIntents.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/model/SendDestinationClickIntents.kt similarity index 60% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/SendDestinationClickIntents.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/model/SendDestinationClickIntents.kt index 73a1ce762b..e57643390c 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/SendDestinationClickIntents.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/model/SendDestinationClickIntents.kt @@ -1,6 +1,6 @@ -package com.tangem.features.send.v2.subcomponents.destination.model +package com.tangem.features.send.subcomponents.destination.model -import com.tangem.features.send.v2.subcomponents.destination.analytics.EnterAddressSource +import com.tangem.features.send.subcomponents.destination.analytics.EnterAddressSource internal interface SendDestinationClickIntents { diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/SendDestinationModel.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/model/SendDestinationModel.kt similarity index 90% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/SendDestinationModel.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/model/SendDestinationModel.kt index be1229b281..86a15ad9e0 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/SendDestinationModel.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/model/SendDestinationModel.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.subcomponents.destination.model +package com.tangem.features.send.subcomponents.destination.model import androidx.compose.runtime.Stable import arrow.core.getOrElse @@ -30,18 +30,24 @@ import com.tangem.domain.transaction.usecase.ValidateWalletAddressUseCase import com.tangem.domain.transaction.usecase.ValidateWalletMemoUseCase import com.tangem.domain.txhistory.usecase.GetFixedTxHistoryItemsUseCase import com.tangem.domain.wallets.usecase.GetWalletsUseCase -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents.SendScreenSource -import com.tangem.features.send.v2.api.entity.PredefinedValues -import com.tangem.features.send.v2.api.subcomponents.destination.SendDestinationComponentParams -import com.tangem.features.send.v2.api.subcomponents.destination.SendDestinationComponentParams.DestinationBlockParams -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationUM -import com.tangem.features.send.v2.common.CommonSendRoute -import com.tangem.features.send.v2.impl.R -import com.tangem.features.send.v2.subcomponents.destination.analytics.EnterAddressSource -import com.tangem.features.send.v2.subcomponents.destination.analytics.SendDestinationAnalyticEvents -import com.tangem.features.send.v2.subcomponents.destination.model.transformers.* -import com.tangem.features.send.v2.subcomponents.destination.ui.state.DestinationWalletUM +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents.SendScreenSource +import com.tangem.features.send.api.entity.PredefinedValues +import com.tangem.features.send.api.subcomponents.destination.SendDestinationComponentParams +import com.tangem.features.send.api.subcomponents.destination.SendDestinationComponentParams.DestinationBlockParams +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationUM +import com.tangem.features.send.common.CommonSendRoute +import com.tangem.features.send.subcomponents.destination.analytics.EnterAddressSource +import com.tangem.features.send.subcomponents.destination.analytics.SendDestinationAnalyticEvents +import com.tangem.features.send.subcomponents.destination.model.transformers.SendDestinationAddressTransformer +import com.tangem.features.send.subcomponents.destination.model.transformers.SendDestinationInitialStateTransformer +import com.tangem.features.send.subcomponents.destination.model.transformers.SendDestinationMemoTransformer +import com.tangem.features.send.subcomponents.destination.model.transformers.SendDestinationPredefinedStateTransformer +import com.tangem.features.send.subcomponents.destination.model.transformers.SendDestinationRecentListTransformer +import com.tangem.features.send.subcomponents.destination.model.transformers.SendDestinationValidationResultTransformer +import com.tangem.features.send.subcomponents.destination.model.transformers.SendDestinationValidationStartedTransformer +import com.tangem.features.send.subcomponents.destination.ui.state.DestinationWalletUM +import com.tangem.features.send.impl.R import com.tangem.utils.coroutines.CoroutineDispatcherProvider import com.tangem.utils.coroutines.JobHolder import com.tangem.utils.coroutines.saveIn diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/converters/SendRecipientHistoryListConverter.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/model/converters/SendRecipientHistoryListConverter.kt similarity index 87% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/converters/SendRecipientHistoryListConverter.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/model/converters/SendRecipientHistoryListConverter.kt index 6b9979cbfa..d508e2a77c 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/converters/SendRecipientHistoryListConverter.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/model/converters/SendRecipientHistoryListConverter.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.subcomponents.destination.model.converters +package com.tangem.features.send.subcomponents.destination.model.converters import com.tangem.core.ui.extensions.TextReference import com.tangem.core.ui.extensions.resourceReference @@ -11,11 +11,11 @@ import com.tangem.core.ui.utils.toDateFormatWithTodayYesterday import com.tangem.core.ui.utils.toTimeFormat import com.tangem.domain.models.currency.CryptoCurrency import com.tangem.domain.models.network.TxInfo -import com.tangem.features.send.v2.impl.R -import com.tangem.features.send.v2.subcomponents.destination.model.transformers.RECENT_DEFAULT_COUNT -import com.tangem.features.send.v2.subcomponents.destination.model.transformers.RECENT_KEY_TAG -import com.tangem.features.send.v2.subcomponents.destination.model.transformers.emptyListState -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationRecipientListUM +import com.tangem.features.send.impl.R +import com.tangem.features.send.subcomponents.destination.model.transformers.RECENT_DEFAULT_COUNT +import com.tangem.features.send.subcomponents.destination.model.transformers.RECENT_KEY_TAG +import com.tangem.features.send.subcomponents.destination.model.transformers.emptyListState +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationRecipientListUM import com.tangem.utils.converter.Converter import com.tangem.utils.extensions.isZero import kotlinx.collections.immutable.ImmutableList diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/converters/SendRecipientWalletListConverter.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/model/converters/SendRecipientWalletListConverter.kt similarity index 87% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/converters/SendRecipientWalletListConverter.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/model/converters/SendRecipientWalletListConverter.kt index 47b90757be..745671b2b5 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/converters/SendRecipientWalletListConverter.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/model/converters/SendRecipientWalletListConverter.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.subcomponents.destination.model.converters +package com.tangem.features.send.subcomponents.destination.model.converters import com.tangem.common.ui.account.AccountIconUM import com.tangem.common.ui.account.AccountTitleUM @@ -7,11 +7,11 @@ import com.tangem.common.ui.account.toUM import com.tangem.core.ui.extensions.stringReference import com.tangem.domain.models.account.Account import com.tangem.domain.models.currency.CryptoCurrency -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationRecipientListUM -import com.tangem.features.send.v2.subcomponents.destination.model.transformers.WALLET_DEFAULT_COUNT -import com.tangem.features.send.v2.subcomponents.destination.model.transformers.WALLET_KEY_TAG -import com.tangem.features.send.v2.subcomponents.destination.model.transformers.emptyListState -import com.tangem.features.send.v2.subcomponents.destination.ui.state.DestinationWalletUM +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationRecipientListUM +import com.tangem.features.send.subcomponents.destination.model.transformers.WALLET_DEFAULT_COUNT +import com.tangem.features.send.subcomponents.destination.model.transformers.WALLET_KEY_TAG +import com.tangem.features.send.subcomponents.destination.model.transformers.emptyListState +import com.tangem.features.send.subcomponents.destination.ui.state.DestinationWalletUM import com.tangem.utils.StringsSigns import com.tangem.utils.converter.Converter import kotlinx.collections.immutable.PersistentList diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/RecentListUtils.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/model/transformers/RecentListUtils.kt similarity index 81% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/RecentListUtils.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/model/transformers/RecentListUtils.kt index 638d7abede..591430ea5f 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/RecentListUtils.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/model/transformers/RecentListUtils.kt @@ -1,6 +1,6 @@ -package com.tangem.features.send.v2.subcomponents.destination.model.transformers +package com.tangem.features.send.subcomponents.destination.model.transformers -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationRecipientListUM +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationRecipientListUM import kotlinx.collections.immutable.toPersistentList internal const val WALLET_DEFAULT_COUNT = 1 diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/SendDestinationAddressTransformer.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/model/transformers/SendDestinationAddressTransformer.kt similarity index 74% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/SendDestinationAddressTransformer.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/model/transformers/SendDestinationAddressTransformer.kt index 0dce046d7a..28b4d121c0 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/SendDestinationAddressTransformer.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/model/transformers/SendDestinationAddressTransformer.kt @@ -1,6 +1,6 @@ -package com.tangem.features.send.v2.subcomponents.destination.model.transformers +package com.tangem.features.send.subcomponents.destination.model.transformers -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationUM +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationUM import com.tangem.utils.transformer.Transformer internal class SendDestinationAddressTransformer( diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/SendDestinationInitialStateTransformer.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/model/transformers/SendDestinationInitialStateTransformer.kt similarity index 90% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/SendDestinationInitialStateTransformer.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/model/transformers/SendDestinationInitialStateTransformer.kt index 0fc9f3c4a6..475002b694 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/SendDestinationInitialStateTransformer.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/model/transformers/SendDestinationInitialStateTransformer.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.subcomponents.destination.model.transformers +package com.tangem.features.send.subcomponents.destination.model.transformers import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.ui.text.input.ImeAction @@ -6,9 +6,9 @@ import androidx.compose.ui.text.input.KeyboardType import com.tangem.core.ui.extensions.resourceReference import com.tangem.domain.models.currency.CryptoCurrency import com.tangem.domain.models.network.Network -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationTextFieldUM -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationUM -import com.tangem.features.send.v2.impl.R +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationTextFieldUM +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationUM +import com.tangem.features.send.impl.R import com.tangem.utils.transformer.Transformer internal class SendDestinationInitialStateTransformer( diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/SendDestinationMemoTransformer.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/model/transformers/SendDestinationMemoTransformer.kt similarity index 74% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/SendDestinationMemoTransformer.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/model/transformers/SendDestinationMemoTransformer.kt index 83f526462c..f740f01476 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/SendDestinationMemoTransformer.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/model/transformers/SendDestinationMemoTransformer.kt @@ -1,6 +1,6 @@ -package com.tangem.features.send.v2.subcomponents.destination.model.transformers +package com.tangem.features.send.subcomponents.destination.model.transformers -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationUM +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationUM import com.tangem.utils.transformer.Transformer internal class SendDestinationMemoTransformer( diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/SendDestinationPredefinedStateTransformer.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/model/transformers/SendDestinationPredefinedStateTransformer.kt similarity index 78% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/SendDestinationPredefinedStateTransformer.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/model/transformers/SendDestinationPredefinedStateTransformer.kt index 94ba50e2ab..e4fef7d596 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/SendDestinationPredefinedStateTransformer.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/model/transformers/SendDestinationPredefinedStateTransformer.kt @@ -1,6 +1,6 @@ -package com.tangem.features.send.v2.subcomponents.destination.model.transformers +package com.tangem.features.send.subcomponents.destination.model.transformers -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationUM +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationUM import com.tangem.utils.transformer.Transformer internal class SendDestinationPredefinedStateTransformer( diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/SendDestinationRecentListTransformer.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/model/transformers/SendDestinationRecentListTransformer.kt similarity index 71% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/SendDestinationRecentListTransformer.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/model/transformers/SendDestinationRecentListTransformer.kt index 7dcd652b78..f925eedd43 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/SendDestinationRecentListTransformer.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/model/transformers/SendDestinationRecentListTransformer.kt @@ -1,11 +1,11 @@ -package com.tangem.features.send.v2.subcomponents.destination.model.transformers +package com.tangem.features.send.subcomponents.destination.model.transformers import com.tangem.domain.models.currency.CryptoCurrency import com.tangem.domain.models.network.TxInfo -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationUM -import com.tangem.features.send.v2.subcomponents.destination.model.converters.SendRecipientHistoryListConverter -import com.tangem.features.send.v2.subcomponents.destination.model.converters.SendRecipientWalletListConverter -import com.tangem.features.send.v2.subcomponents.destination.ui.state.DestinationWalletUM +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationUM +import com.tangem.features.send.subcomponents.destination.model.converters.SendRecipientHistoryListConverter +import com.tangem.features.send.subcomponents.destination.model.converters.SendRecipientWalletListConverter +import com.tangem.features.send.subcomponents.destination.ui.state.DestinationWalletUM import com.tangem.utils.transformer.Transformer @Suppress("LongParameterList") diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/SendDestinationValidationResultTransformer.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/model/transformers/SendDestinationValidationResultTransformer.kt similarity index 92% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/SendDestinationValidationResultTransformer.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/model/transformers/SendDestinationValidationResultTransformer.kt index 93fdb5aba2..dccad080f8 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/SendDestinationValidationResultTransformer.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/model/transformers/SendDestinationValidationResultTransformer.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.subcomponents.destination.model.transformers +package com.tangem.features.send.subcomponents.destination.model.transformers import arrow.core.Either import com.tangem.core.ui.extensions.TextReference @@ -6,9 +6,9 @@ import com.tangem.core.ui.extensions.resourceReference import com.tangem.domain.transaction.error.AddressValidation import com.tangem.domain.transaction.error.AddressValidationResult import com.tangem.domain.transaction.error.ValidateMemoError -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationTextFieldUM -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationUM -import com.tangem.features.send.v2.impl.R +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationTextFieldUM +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationUM +import com.tangem.features.send.impl.R import com.tangem.utils.transformer.Transformer import kotlinx.collections.immutable.toPersistentList diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/SendDestinationValidationStartedTransformer.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/model/transformers/SendDestinationValidationStartedTransformer.kt similarity index 67% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/SendDestinationValidationStartedTransformer.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/model/transformers/SendDestinationValidationStartedTransformer.kt index 6bc6d5a3bf..5df806b461 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/SendDestinationValidationStartedTransformer.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/model/transformers/SendDestinationValidationStartedTransformer.kt @@ -1,6 +1,6 @@ -package com.tangem.features.send.v2.subcomponents.destination.model.transformers +package com.tangem.features.send.subcomponents.destination.model.transformers -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationUM +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationUM import com.tangem.utils.transformer.Transformer internal object SendDestinationValidationStartedTransformer : Transformer { diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/ui/DestinationBlock.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/ui/DestinationBlock.kt similarity index 94% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/ui/DestinationBlock.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/ui/DestinationBlock.kt index 444ee04cdd..9be924e008 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/ui/DestinationBlock.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/ui/DestinationBlock.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.subcomponents.destination.ui +package com.tangem.features.send.subcomponents.destination.ui import android.content.res.Configuration import androidx.compose.foundation.background @@ -22,10 +22,10 @@ import com.tangem.core.ui.extensions.stringResourceSafe import com.tangem.core.ui.res.TangemTheme import com.tangem.core.ui.res.TangemThemePreview import com.tangem.core.ui.test.SendConfirmScreenTestTags -import com.tangem.features.send.v2.impl.R -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationRecipientListUM -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationTextFieldUM -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationUM +import com.tangem.features.send.impl.R +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationRecipientListUM +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationTextFieldUM +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationUM import kotlinx.collections.immutable.toImmutableList @Composable diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/ui/ListItemWithIcon.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/ui/ListItemWithIcon.kt similarity index 98% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/ui/ListItemWithIcon.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/ui/ListItemWithIcon.kt index 51573ec74f..6b0a029db3 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/ui/ListItemWithIcon.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/ui/ListItemWithIcon.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.subcomponents.destination.ui +package com.tangem.features.send.subcomponents.destination.ui import android.content.res.Configuration import androidx.annotation.DrawableRes @@ -39,7 +39,7 @@ import com.tangem.core.ui.res.TangemTheme import com.tangem.core.ui.res.TangemThemePreview import com.tangem.core.ui.test.SendAddressScreenTestTags import com.tangem.domain.models.account.CryptoPortfolioIcon -import com.tangem.features.send.v2.impl.R +import com.tangem.features.send.impl.R import com.tangem.utils.StringsSigns /** diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/ui/SendDestinationContent.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/ui/SendDestinationContent.kt similarity index 95% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/ui/SendDestinationContent.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/ui/SendDestinationContent.kt index 9a999b3ece..1c539cd97b 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/ui/SendDestinationContent.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/ui/SendDestinationContent.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.subcomponents.destination.ui +package com.tangem.features.send.subcomponents.destination.ui import androidx.annotation.StringRes import androidx.compose.animation.* @@ -30,12 +30,12 @@ import com.tangem.core.ui.extensions.* import com.tangem.core.ui.res.TangemTheme import com.tangem.core.ui.test.SendAddressScreenTestTags import com.tangem.core.ui.utils.GlobalMultipleClickPreventer -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationRecipientListUM -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationTextFieldUM -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationUM -import com.tangem.features.send.v2.impl.R -import com.tangem.features.send.v2.subcomponents.destination.analytics.EnterAddressSource -import com.tangem.features.send.v2.subcomponents.destination.model.SendDestinationClickIntents +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationRecipientListUM +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationTextFieldUM +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationUM +import com.tangem.features.send.subcomponents.destination.analytics.EnterAddressSource +import com.tangem.features.send.subcomponents.destination.model.SendDestinationClickIntents +import com.tangem.features.send.impl.R import kotlinx.collections.immutable.ImmutableList private const val ADDRESS_FIELD_KEY = "ADDRESS_FIELD_KEY" diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/ui/TextFieldWithPaste.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/ui/TextFieldWithPaste.kt similarity index 98% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/ui/TextFieldWithPaste.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/ui/TextFieldWithPaste.kt index 31cc7769f0..6206bdb1b0 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/ui/TextFieldWithPaste.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/ui/TextFieldWithPaste.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.subcomponents.destination.ui +package com.tangem.features.send.subcomponents.destination.ui import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.fadeIn diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/ui/state/DestinationWalletUM.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/ui/state/DestinationWalletUM.kt similarity index 90% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/ui/state/DestinationWalletUM.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/ui/state/DestinationWalletUM.kt index 7cdbd207a8..3da958be7a 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/ui/state/DestinationWalletUM.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/destination/ui/state/DestinationWalletUM.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.subcomponents.destination.ui.state +package com.tangem.features.send.subcomponents.destination.ui.state import androidx.compose.runtime.Immutable import com.tangem.domain.models.account.Account diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/fee/model/converters/custom/CustomFeeConverter.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/fee/model/converters/custom/CustomFeeConverter.kt similarity index 75% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/fee/model/converters/custom/CustomFeeConverter.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/fee/model/converters/custom/CustomFeeConverter.kt index d6b491a71f..208f6c8958 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/fee/model/converters/custom/CustomFeeConverter.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/fee/model/converters/custom/CustomFeeConverter.kt @@ -1,7 +1,7 @@ -package com.tangem.features.send.v2.subcomponents.fee.model.converters.custom +package com.tangem.features.send.subcomponents.fee.model.converters.custom import com.tangem.blockchain.common.transaction.Fee -import com.tangem.features.send.v2.api.entity.CustomFeeFieldUM +import com.tangem.features.send.api.entity.CustomFeeFieldUM import com.tangem.utils.converter.Converter import kotlinx.collections.immutable.ImmutableList diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/fee/model/converters/custom/bitcoin/BitcoinCustomFeeConverter.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/fee/model/converters/custom/bitcoin/BitcoinCustomFeeConverter.kt similarity index 89% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/fee/model/converters/custom/bitcoin/BitcoinCustomFeeConverter.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/fee/model/converters/custom/bitcoin/BitcoinCustomFeeConverter.kt index 2d1b56c8bb..b46f34254d 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/fee/model/converters/custom/bitcoin/BitcoinCustomFeeConverter.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/fee/model/converters/custom/bitcoin/BitcoinCustomFeeConverter.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.subcomponents.fee.model.converters.custom.bitcoin +package com.tangem.features.send.subcomponents.fee.model.converters.custom.bitcoin import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions @@ -11,10 +11,10 @@ import com.tangem.core.ui.utils.parseBigDecimal import com.tangem.core.ui.utils.parseToBigDecimal import com.tangem.domain.appcurrency.model.AppCurrency import com.tangem.domain.models.currency.CryptoCurrencyStatus -import com.tangem.features.send.v2.api.entity.CustomFeeFieldUM -import com.tangem.features.send.v2.api.subcomponents.feeSelector.utils.FeeCalculationUtils.checkExceedBalance -import com.tangem.features.send.v2.impl.R -import com.tangem.features.send.v2.subcomponents.fee.model.converters.custom.CustomFeeConverter +import com.tangem.features.send.api.entity.CustomFeeFieldUM +import com.tangem.features.send.api.subcomponents.feeSelector.utils.FeeCalculationUtils.checkExceedBalance +import com.tangem.features.send.subcomponents.fee.model.converters.custom.CustomFeeConverter +import com.tangem.features.send.impl.R import com.tangem.lib.crypto.BlockchainUtils import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.persistentListOf @@ -42,8 +42,8 @@ internal class BitcoinCustomFeeConverter( symbol = value.amount.currencySymbol, onValueChange = { onCustomFeeValueChange(FEE_AMOUNT_INDEX, it) }, keyboardOptions = KeyboardOptions( - imeAction = ImeAction.Companion.Next, - keyboardType = KeyboardType.Companion.Number, + imeAction = ImeAction.Next, + keyboardType = KeyboardType.Number, ), title = resourceReference(R.string.send_max_fee), footer = resourceReference(R.string.send_bitcoin_custom_fee_footer), @@ -72,11 +72,11 @@ internal class BitcoinCustomFeeConverter( feeAmount = feeValue, ) ) { - ImeAction.Companion.None + ImeAction.None } else { - ImeAction.Companion.Done + ImeAction.Done }, - keyboardType = KeyboardType.Companion.Number, + keyboardType = KeyboardType.Number, ), keyboardActions = KeyboardActions( onDone = if (onNextClick != null) { diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/fee/model/converters/custom/ethereum/BaseEthereumCustomFeeConverter.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/fee/model/converters/custom/ethereum/BaseEthereumCustomFeeConverter.kt similarity index 68% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/fee/model/converters/custom/ethereum/BaseEthereumCustomFeeConverter.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/fee/model/converters/custom/ethereum/BaseEthereumCustomFeeConverter.kt index 96f7c1740e..ad0a9617c8 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/fee/model/converters/custom/ethereum/BaseEthereumCustomFeeConverter.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/fee/model/converters/custom/ethereum/BaseEthereumCustomFeeConverter.kt @@ -1,8 +1,8 @@ -package com.tangem.features.send.v2.subcomponents.fee.model.converters.custom.ethereum +package com.tangem.features.send.subcomponents.fee.model.converters.custom.ethereum import com.tangem.blockchain.common.transaction.Fee -import com.tangem.features.send.v2.subcomponents.fee.model.converters.custom.CustomFeeConverter -import com.tangem.features.send.v2.api.entity.CustomFeeFieldUM +import com.tangem.features.send.subcomponents.fee.model.converters.custom.CustomFeeConverter +import com.tangem.features.send.api.entity.CustomFeeFieldUM import kotlinx.collections.immutable.ImmutableList /** diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/fee/model/converters/custom/ethereum/EthereumCustomFeeConverter.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/fee/model/converters/custom/ethereum/EthereumCustomFeeConverter.kt similarity index 95% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/fee/model/converters/custom/ethereum/EthereumCustomFeeConverter.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/fee/model/converters/custom/ethereum/EthereumCustomFeeConverter.kt index 7a7d53e4ec..d42363bd99 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/fee/model/converters/custom/ethereum/EthereumCustomFeeConverter.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/fee/model/converters/custom/ethereum/EthereumCustomFeeConverter.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.subcomponents.fee.model.converters.custom.ethereum +package com.tangem.features.send.subcomponents.fee.model.converters.custom.ethereum import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions @@ -10,9 +10,9 @@ import com.tangem.core.ui.extensions.resourceReference import com.tangem.core.ui.utils.parseBigDecimal import com.tangem.domain.appcurrency.model.AppCurrency import com.tangem.domain.models.currency.CryptoCurrencyStatus -import com.tangem.features.send.v2.api.entity.CustomFeeFieldUM -import com.tangem.features.send.v2.api.subcomponents.feeSelector.utils.FeeCalculationUtils.checkExceedBalance -import com.tangem.features.send.v2.impl.R +import com.tangem.features.send.api.entity.CustomFeeFieldUM +import com.tangem.features.send.api.subcomponents.feeSelector.utils.FeeCalculationUtils.checkExceedBalance +import com.tangem.features.send.impl.R import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.persistentListOf import kotlinx.collections.immutable.toImmutableList diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/fee/model/converters/custom/ethereum/EthereumEIPCustomFeeConverter.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/fee/model/converters/custom/ethereum/EthereumEIPCustomFeeConverter.kt similarity index 76% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/fee/model/converters/custom/ethereum/EthereumEIPCustomFeeConverter.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/fee/model/converters/custom/ethereum/EthereumEIPCustomFeeConverter.kt index 0c172c3aa7..975d2712e7 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/fee/model/converters/custom/ethereum/EthereumEIPCustomFeeConverter.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/fee/model/converters/custom/ethereum/EthereumEIPCustomFeeConverter.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.subcomponents.fee.model.converters.custom.ethereum +package com.tangem.features.send.subcomponents.fee.model.converters.custom.ethereum import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions @@ -11,14 +11,11 @@ import com.tangem.core.ui.utils.parseBigDecimal import com.tangem.core.ui.utils.parseToBigDecimal import com.tangem.domain.appcurrency.model.AppCurrency import com.tangem.domain.models.currency.CryptoCurrencyStatus -import com.tangem.features.send.v2.api.entity.CustomFeeFieldUM -import com.tangem.features.send.v2.api.subcomponents.feeSelector.utils.FeeCalculationUtils.checkExceedBalance -import com.tangem.features.send.v2.impl.R -import com.tangem.features.send.v2.subcomponents.fee.model.converters.custom.ethereum.EthereumCustomFeeConverter.Companion.ETHEREUM_GAS_UNIT -import com.tangem.features.send.v2.subcomponents.fee.model.converters.custom.ethereum.EthereumCustomFeeConverter.Companion.FEE_AMOUNT -import com.tangem.features.send.v2.subcomponents.fee.model.converters.custom.ethereum.EthereumCustomFeeConverter.Companion.GAS_DECIMALS -import com.tangem.features.send.v2.subcomponents.fee.model.converters.custom.ethereum.EthereumCustomFeeConverter.Companion.GIGA_DECIMALS -import com.tangem.features.send.v2.subcomponents.fee.model.converters.custom.setEmpty +import com.tangem.features.send.api.entity.CustomFeeFieldUM +import com.tangem.features.send.api.subcomponents.feeSelector.utils.FeeCalculationUtils.checkExceedBalance +import com.tangem.features.send.subcomponents.fee.model.converters.custom.setEmpty +import com.tangem.features.send.impl.R +import com.tangem.features.send.subcomponents.fee.model.converters.custom.ethereum.EthereumCustomFeeConverter.Companion.FEE_AMOUNT import com.tangem.utils.extensions.isZero import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.persistentListOf @@ -36,9 +33,13 @@ internal class EthereumEIPCustomFeeConverter( override fun convert(value: Fee.Ethereum.EIP1559): ImmutableList { return persistentListOf( CustomFeeFieldUM( - value = value.maxFeePerGas.toBigDecimal().movePointLeft(GIGA_DECIMALS).parseBigDecimal(GIGA_DECIMALS), - decimals = GIGA_DECIMALS, - symbol = ETHEREUM_GAS_UNIT, + value = value.maxFeePerGas.toBigDecimal().movePointLeft( + EthereumCustomFeeConverter.GIGA_DECIMALS, + ).parseBigDecimal( + EthereumCustomFeeConverter.GIGA_DECIMALS, + ), + decimals = EthereumCustomFeeConverter.GIGA_DECIMALS, + symbol = EthereumCustomFeeConverter.ETHEREUM_GAS_UNIT, title = resourceReference(R.string.send_custom_evm_max_fee), footer = resourceReference(R.string.send_custom_evm_max_fee_footer), onValueChange = { onCustomFeeValueChange(MAX_FEE, it) }, @@ -46,9 +47,13 @@ internal class EthereumEIPCustomFeeConverter( keyboardActions = KeyboardActions(), ), CustomFeeFieldUM( - value = value.priorityFee.toBigDecimal().movePointLeft(GIGA_DECIMALS).parseBigDecimal(GIGA_DECIMALS), - decimals = GIGA_DECIMALS, - symbol = ETHEREUM_GAS_UNIT, + value = value.priorityFee.toBigDecimal().movePointLeft( + EthereumCustomFeeConverter.GIGA_DECIMALS, + ).parseBigDecimal( + EthereumCustomFeeConverter.GIGA_DECIMALS, + ), + decimals = EthereumCustomFeeConverter.GIGA_DECIMALS, + symbol = EthereumCustomFeeConverter.ETHEREUM_GAS_UNIT, title = resourceReference(R.string.send_custom_evm_priority_fee), footer = resourceReference(R.string.send_custom_evm_priority_fee_footer), onValueChange = { onCustomFeeValueChange(PRIORITY_FEE, it) }, @@ -62,7 +67,9 @@ internal class EthereumEIPCustomFeeConverter( normalFee: Fee.Ethereum.EIP1559, value: ImmutableList, ): Fee.Ethereum.EIP1559 { - val feeAmount = value[FEE_AMOUNT].value.parseToBigDecimal(value[FEE_AMOUNT].decimals) + val feeAmount = value[EthereumCustomFeeConverter.FEE_AMOUNT].value.parseToBigDecimal( + value[EthereumCustomFeeConverter.FEE_AMOUNT].decimals, + ) val maxFeeDecimals = value[MAX_FEE].decimals val maxFee = value[MAX_FEE].value.parseToBigDecimal(maxFeeDecimals) .movePointRight(maxFeeDecimals) @@ -71,7 +78,7 @@ internal class EthereumEIPCustomFeeConverter( val priorityFee = value[PRIORITY_FEE].value.parseToBigDecimal(priorityFeeDecimals) .movePointRight(priorityFeeDecimals) .toBigInteger() - val gasLimit = value[GAS_LIMIT].value.parseToBigDecimal(GAS_DECIMALS).toBigInteger() + val gasLimit = value[GAS_LIMIT].value.parseToBigDecimal(EthereumCustomFeeConverter.GAS_DECIMALS).toBigInteger() return normalFee.copy( amount = normalFee.amount.copy(value = feeAmount), @@ -92,7 +99,7 @@ internal class EthereumEIPCustomFeeConverter( val mutableCustomValues = customValues.toMutableList() return mutableCustomValues.apply { when (index) { - FEE_AMOUNT -> setOnAmountChange(feeValue, value, index) + EthereumCustomFeeConverter.FEE_AMOUNT -> setOnAmountChange(feeValue, value, index) MAX_FEE -> setOnMaxFeeChange(value, index) GAS_LIMIT -> setOnGasLimitChange(value, index) else -> set(index, this[index].copy(value = value)) @@ -110,14 +117,18 @@ internal class EthereumEIPCustomFeeConverter( setEmpty(FEE_AMOUNT) setEmpty(MAX_FEE) } else { - val newFeeAmountDecimal = value.parseToBigDecimal(this[FEE_AMOUNT].decimals) - val newFeeAmount = newFeeAmountDecimal.movePointRight(GIGA_DECIMALS) // from ETH to GWEI + val newFeeAmountDecimal = value.parseToBigDecimal(this[EthereumCustomFeeConverter.FEE_AMOUNT].decimals) + val newFeeAmount = newFeeAmountDecimal.movePointRight( + EthereumCustomFeeConverter.GIGA_DECIMALS, + ) // from ETH to GWEI val gasLimit = if (gasLimitRaw.isZero()) { val gasLimitTemp = feeValue.gasLimit.toBigDecimal() set( index = GAS_LIMIT, - element = this[GAS_LIMIT].copy(value = gasLimitTemp.parseBigDecimal(GIGA_DECIMALS)), + element = this[GAS_LIMIT].copy( + value = gasLimitTemp.parseBigDecimal(EthereumCustomFeeConverter.GIGA_DECIMALS), + ), ) gasLimitTemp } else { @@ -128,8 +139,10 @@ internal class EthereumEIPCustomFeeConverter( set( index = PRIORITY_FEE, element = this[PRIORITY_FEE].copy( - value = feeValue.priorityFee.toBigDecimal().movePointLeft(GIGA_DECIMALS) - .parseBigDecimal(GIGA_DECIMALS), + value = feeValue.priorityFee.toBigDecimal().movePointLeft( + EthereumCustomFeeConverter.GIGA_DECIMALS, + ) + .parseBigDecimal(EthereumCustomFeeConverter.GIGA_DECIMALS), ), ) } @@ -165,9 +178,9 @@ internal class EthereumEIPCustomFeeConverter( val newMaxFee = value.parseToBigDecimal(this[MAX_FEE].decimals).movePointLeft(this[MAX_FEE].decimals) val newFeeAmount = gasLimit * newMaxFee set( - FEE_AMOUNT, - this[FEE_AMOUNT].copy( - value = newFeeAmount.parseBigDecimal(this[FEE_AMOUNT].decimals), + EthereumCustomFeeConverter.FEE_AMOUNT, + this[EthereumCustomFeeConverter.FEE_AMOUNT].copy( + value = newFeeAmount.parseBigDecimal(this[EthereumCustomFeeConverter.FEE_AMOUNT].decimals), label = getFiatReference( rate = currencyStatus.fiatRate, value = newFeeAmount, @@ -192,9 +205,9 @@ internal class EthereumEIPCustomFeeConverter( val newFeeAmount = newGasLimit * maxFee set( - index = FEE_AMOUNT, - element = this[FEE_AMOUNT].copy( - value = newFeeAmount.parseBigDecimal(this[FEE_AMOUNT].decimals), + index = EthereumCustomFeeConverter.FEE_AMOUNT, + element = this[EthereumCustomFeeConverter.FEE_AMOUNT].copy( + value = newFeeAmount.parseBigDecimal(this[EthereumCustomFeeConverter.FEE_AMOUNT].decimals), label = getFiatReference( rate = currencyStatus.fiatRate, value = newFeeAmount, diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/fee/model/converters/custom/ethereum/EthereumLegacyCustomFeeConverter.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/fee/model/converters/custom/ethereum/EthereumLegacyCustomFeeConverter.kt similarity index 78% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/fee/model/converters/custom/ethereum/EthereumLegacyCustomFeeConverter.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/fee/model/converters/custom/ethereum/EthereumLegacyCustomFeeConverter.kt index f2033a8a95..54084639bc 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/fee/model/converters/custom/ethereum/EthereumLegacyCustomFeeConverter.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/fee/model/converters/custom/ethereum/EthereumLegacyCustomFeeConverter.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.subcomponents.fee.model.converters.custom.ethereum +package com.tangem.features.send.subcomponents.fee.model.converters.custom.ethereum import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions @@ -11,14 +11,11 @@ import com.tangem.core.ui.utils.parseBigDecimal import com.tangem.core.ui.utils.parseToBigDecimal import com.tangem.domain.appcurrency.model.AppCurrency import com.tangem.domain.models.currency.CryptoCurrencyStatus -import com.tangem.features.send.v2.api.entity.CustomFeeFieldUM -import com.tangem.features.send.v2.api.subcomponents.feeSelector.utils.FeeCalculationUtils.checkExceedBalance -import com.tangem.features.send.v2.impl.R -import com.tangem.features.send.v2.subcomponents.fee.model.converters.custom.ethereum.EthereumCustomFeeConverter.Companion.ETHEREUM_GAS_UNIT -import com.tangem.features.send.v2.subcomponents.fee.model.converters.custom.ethereum.EthereumCustomFeeConverter.Companion.FEE_AMOUNT -import com.tangem.features.send.v2.subcomponents.fee.model.converters.custom.ethereum.EthereumCustomFeeConverter.Companion.GAS_DECIMALS -import com.tangem.features.send.v2.subcomponents.fee.model.converters.custom.ethereum.EthereumCustomFeeConverter.Companion.GIGA_DECIMALS -import com.tangem.features.send.v2.subcomponents.fee.model.converters.custom.setEmpty +import com.tangem.features.send.api.entity.CustomFeeFieldUM +import com.tangem.features.send.api.subcomponents.feeSelector.utils.FeeCalculationUtils.checkExceedBalance +import com.tangem.features.send.subcomponents.fee.model.converters.custom.setEmpty +import com.tangem.features.send.impl.R +import com.tangem.features.send.subcomponents.fee.model.converters.custom.ethereum.EthereumCustomFeeConverter.Companion.FEE_AMOUNT import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.persistentListOf import kotlinx.collections.immutable.toImmutableList @@ -35,9 +32,13 @@ internal class EthereumLegacyCustomFeeConverter( override fun convert(value: Fee.Ethereum.Legacy): ImmutableList { return persistentListOf( CustomFeeFieldUM( - value = value.gasPrice.toBigDecimal().movePointLeft(GIGA_DECIMALS).parseBigDecimal(GIGA_DECIMALS), - decimals = GIGA_DECIMALS, - symbol = ETHEREUM_GAS_UNIT, + value = value.gasPrice.toBigDecimal().movePointLeft( + EthereumCustomFeeConverter.GIGA_DECIMALS, + ).parseBigDecimal( + EthereumCustomFeeConverter.GIGA_DECIMALS, + ), + decimals = EthereumCustomFeeConverter.GIGA_DECIMALS, + symbol = EthereumCustomFeeConverter.ETHEREUM_GAS_UNIT, title = resourceReference(R.string.send_gas_price), footer = resourceReference(R.string.send_gas_price_footer), onValueChange = { onCustomFeeValueChange(GAS_PRICE, it) }, @@ -54,9 +55,11 @@ internal class EthereumLegacyCustomFeeConverter( normalFee: Fee.Ethereum.Legacy, value: ImmutableList, ): Fee.Ethereum.Legacy { - val feeAmount = value[FEE_AMOUNT].value.parseToBigDecimal(value[FEE_AMOUNT].decimals) - val gasPrice = value[GAS_PRICE].value.parseToBigDecimal(GAS_DECIMALS).toBigInteger() - val gasLimit = value[GAS_LIMIT].value.parseToBigDecimal(GAS_DECIMALS).toBigInteger() + val feeAmount = value[EthereumCustomFeeConverter.FEE_AMOUNT].value.parseToBigDecimal( + value[EthereumCustomFeeConverter.FEE_AMOUNT].decimals, + ) + val gasPrice = value[GAS_PRICE].value.parseToBigDecimal(EthereumCustomFeeConverter.GAS_DECIMALS).toBigInteger() + val gasLimit = value[GAS_LIMIT].value.parseToBigDecimal(EthereumCustomFeeConverter.GAS_DECIMALS).toBigInteger() return normalFee.copy( amount = normalFee.amount.copy(value = feeAmount), @@ -76,7 +79,7 @@ internal class EthereumLegacyCustomFeeConverter( val mutableCustomValues = customValues.toMutableList() return mutableCustomValues.apply { when (index) { - FEE_AMOUNT -> setOnAmountChange(value, index) + EthereumCustomFeeConverter.FEE_AMOUNT -> setOnAmountChange(value, index) GAS_PRICE -> setOnGasPriceChange(value, index) GAS_LIMIT -> setOnGasLimitChange(value, index) else -> set(index, this[index].copy(value = value)) @@ -90,7 +93,7 @@ internal class EthereumLegacyCustomFeeConverter( setEmpty(FEE_AMOUNT) setEmpty(GAS_PRICE) } else { - val newFeeAmountDecimal = value.parseToBigDecimal(this[FEE_AMOUNT].decimals) + val newFeeAmountDecimal = value.parseToBigDecimal(this[EthereumCustomFeeConverter.FEE_AMOUNT].decimals) val newFeeAmount = newFeeAmountDecimal.movePointRight(this[GAS_PRICE].decimals) // from ETH to GWEI val newGasPrice = newFeeAmount.divide(gasLimit, this[GAS_PRICE].decimals, RoundingMode.HALF_UP) set(GAS_PRICE, this[GAS_PRICE].copy(value = newGasPrice.parseBigDecimal(this[GAS_PRICE].decimals))) @@ -118,9 +121,9 @@ internal class EthereumLegacyCustomFeeConverter( .movePointLeft(this[GAS_PRICE].decimals) // from GWEI to ETH val newFeeAmount = gasLimit * newGasPrice set( - FEE_AMOUNT, - this[FEE_AMOUNT].copy( - value = newFeeAmount.parseBigDecimal(this[FEE_AMOUNT].decimals), + EthereumCustomFeeConverter.FEE_AMOUNT, + this[EthereumCustomFeeConverter.FEE_AMOUNT].copy( + value = newFeeAmount.parseBigDecimal(this[EthereumCustomFeeConverter.FEE_AMOUNT].decimals), label = getFiatReference( rate = currencyStatus.fiatRate, value = newFeeAmount, @@ -144,9 +147,9 @@ internal class EthereumLegacyCustomFeeConverter( val newFeeAmount = newGasLimit * gasPrice set( - index = FEE_AMOUNT, - element = this[FEE_AMOUNT].copy( - value = newFeeAmount.parseBigDecimal(this[FEE_AMOUNT].decimals), + index = EthereumCustomFeeConverter.FEE_AMOUNT, + element = this[EthereumCustomFeeConverter.FEE_AMOUNT].copy( + value = newFeeAmount.parseBigDecimal(this[EthereumCustomFeeConverter.FEE_AMOUNT].decimals), label = getFiatReference( rate = currencyStatus.fiatRate, value = newFeeAmount, diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/fee/model/converters/custom/kaspa/KaspaCustomFeeConverter.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/fee/model/converters/custom/kaspa/KaspaCustomFeeConverter.kt similarity index 92% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/fee/model/converters/custom/kaspa/KaspaCustomFeeConverter.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/fee/model/converters/custom/kaspa/KaspaCustomFeeConverter.kt index 28c949d37e..4edb9bf359 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/fee/model/converters/custom/kaspa/KaspaCustomFeeConverter.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/fee/model/converters/custom/kaspa/KaspaCustomFeeConverter.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.subcomponents.fee.model.converters.custom.kaspa +package com.tangem.features.send.subcomponents.fee.model.converters.custom.kaspa import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions @@ -11,9 +11,9 @@ import com.tangem.core.ui.utils.parseBigDecimal import com.tangem.core.ui.utils.parseToBigDecimal import com.tangem.domain.appcurrency.model.AppCurrency import com.tangem.domain.models.currency.CryptoCurrencyStatus -import com.tangem.features.send.v2.api.entity.CustomFeeFieldUM -import com.tangem.features.send.v2.impl.R -import com.tangem.features.send.v2.subcomponents.fee.model.converters.custom.CustomFeeConverter +import com.tangem.features.send.api.entity.CustomFeeFieldUM +import com.tangem.features.send.subcomponents.fee.model.converters.custom.CustomFeeConverter +import com.tangem.features.send.impl.R import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.persistentListOf import kotlinx.collections.immutable.toImmutableList @@ -36,8 +36,8 @@ internal class KaspaCustomFeeConverter( symbol = value.amount.currencySymbol, onValueChange = { onCustomFeeValueChange(FEE_AMOUNT_INDEX, it) }, keyboardOptions = KeyboardOptions( - imeAction = ImeAction.Companion.Next, - keyboardType = KeyboardType.Companion.Number, + imeAction = ImeAction.Next, + keyboardType = KeyboardType.Number, ), title = resourceReference(R.string.send_max_fee), footer = resourceReference(R.string.send_custom_amount_fee_footer), diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/notifications/DefaultNotificationsUpdateTrigger.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/notifications/DefaultNotificationsUpdateTrigger.kt similarity index 69% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/notifications/DefaultNotificationsUpdateTrigger.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/notifications/DefaultNotificationsUpdateTrigger.kt index 8f4494843f..4173587eba 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/notifications/DefaultNotificationsUpdateTrigger.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/notifications/DefaultNotificationsUpdateTrigger.kt @@ -1,8 +1,8 @@ -package com.tangem.features.send.v2.subcomponents.notifications +package com.tangem.features.send.subcomponents.notifications -import com.tangem.features.send.v2.api.SendNotificationsComponent.Params.NotificationData -import com.tangem.features.send.v2.api.subcomponents.notifications.SendNotificationsUpdateListener -import com.tangem.features.send.v2.api.subcomponents.notifications.SendNotificationsUpdateTrigger +import com.tangem.features.send.api.SendNotificationsComponent.Params.NotificationData +import com.tangem.features.send.api.subcomponents.notifications.SendNotificationsUpdateListener +import com.tangem.features.send.api.subcomponents.notifications.SendNotificationsUpdateTrigger import kotlinx.coroutines.flow.MutableSharedFlow import kotlinx.coroutines.flow.asSharedFlow import javax.inject.Inject diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/notifications/DefaultSendNotificationsComponent.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/notifications/DefaultSendNotificationsComponent.kt similarity index 80% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/notifications/DefaultSendNotificationsComponent.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/notifications/DefaultSendNotificationsComponent.kt index 2a5d8b171c..f20fa251a3 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/notifications/DefaultSendNotificationsComponent.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/notifications/DefaultSendNotificationsComponent.kt @@ -1,14 +1,14 @@ -package com.tangem.features.send.v2.subcomponents.notifications +package com.tangem.features.send.subcomponents.notifications import androidx.compose.foundation.lazy.LazyListScope import androidx.compose.ui.Modifier import com.tangem.common.ui.notifications.NotificationUM import com.tangem.core.decompose.context.AppComponentContext import com.tangem.core.decompose.model.getOrCreateModel -import com.tangem.features.send.v2.api.SendNotificationsComponent -import com.tangem.features.send.v2.api.SendNotificationsComponent.Params -import com.tangem.features.send.v2.subcomponents.notifications -import com.tangem.features.send.v2.subcomponents.notifications.model.NotificationsModel +import com.tangem.features.send.api.SendNotificationsComponent +import com.tangem.features.send.api.SendNotificationsComponent.Params +import com.tangem.features.send.subcomponents.notifications +import com.tangem.features.send.subcomponents.notifications.model.NotificationsModel import dagger.assisted.Assisted import dagger.assisted.AssistedFactory import dagger.assisted.AssistedInject diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/notifications/analytics/NotificationsAnalyticEvents.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/notifications/analytics/NotificationsAnalyticEvents.kt similarity index 93% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/notifications/analytics/NotificationsAnalyticEvents.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/notifications/analytics/NotificationsAnalyticEvents.kt index 784e8dd40c..3a6d9ca2dd 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/notifications/analytics/NotificationsAnalyticEvents.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/notifications/analytics/NotificationsAnalyticEvents.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.subcomponents.notifications.analytics +package com.tangem.features.send.subcomponents.notifications.analytics import com.tangem.core.analytics.models.AnalyticsEvent import com.tangem.core.analytics.models.AnalyticsParam.Key.BLOCKCHAIN diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/notifications/di/NotificationsModule.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/notifications/di/NotificationsModule.kt similarity index 59% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/notifications/di/NotificationsModule.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/notifications/di/NotificationsModule.kt index 99e88f56e9..334c65f85a 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/notifications/di/NotificationsModule.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/notifications/di/NotificationsModule.kt @@ -1,8 +1,8 @@ -package com.tangem.features.send.v2.subcomponents.notifications.di +package com.tangem.features.send.subcomponents.notifications.di -import com.tangem.features.send.v2.api.subcomponents.notifications.SendNotificationsUpdateListener -import com.tangem.features.send.v2.api.subcomponents.notifications.SendNotificationsUpdateTrigger -import com.tangem.features.send.v2.subcomponents.notifications.DefaultNotificationsUpdateTrigger +import com.tangem.features.send.api.subcomponents.notifications.SendNotificationsUpdateListener +import com.tangem.features.send.api.subcomponents.notifications.SendNotificationsUpdateTrigger +import com.tangem.features.send.subcomponents.notifications.DefaultNotificationsUpdateTrigger import dagger.Binds import dagger.Module import dagger.hilt.InstallIn diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/notifications/model/NotificationsModel.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/notifications/model/NotificationsModel.kt similarity index 95% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/notifications/model/NotificationsModel.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/notifications/model/NotificationsModel.kt index 5e0111ec67..e831713c99 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/notifications/model/NotificationsModel.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/notifications/model/NotificationsModel.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.subcomponents.notifications.model +package com.tangem.features.send.subcomponents.notifications.model import androidx.compose.runtime.Stable import arrow.core.getOrElse @@ -35,13 +35,13 @@ import com.tangem.domain.tokens.IsAmountSubtractAvailableUseCase import com.tangem.domain.tokens.model.warnings.CryptoCurrencyCheck import com.tangem.domain.transaction.usecase.ValidateTransactionUseCase import com.tangem.domain.utils.convertToSdkAmount -import com.tangem.features.send.v2.api.SendNotificationsComponent -import com.tangem.features.send.v2.api.SendNotificationsComponent.Params.NotificationData -import com.tangem.features.send.v2.api.subcomponents.feeSelector.utils.FeeCalculationUtils.checkAndCalculateSubtractedAmount -import com.tangem.features.send.v2.api.subcomponents.feeSelector.utils.FeeCalculationUtils.checkFeeCoverage -import com.tangem.features.send.v2.api.subcomponents.notifications.SendNotificationsUpdateListener -import com.tangem.features.send.v2.api.subcomponents.notifications.SendNotificationsUpdateTrigger -import com.tangem.features.send.v2.subcomponents.notifications.analytics.NotificationsAnalyticEvents +import com.tangem.features.send.api.SendNotificationsComponent +import com.tangem.features.send.api.SendNotificationsComponent.Params.NotificationData +import com.tangem.features.send.api.subcomponents.feeSelector.utils.FeeCalculationUtils.checkAndCalculateSubtractedAmount +import com.tangem.features.send.api.subcomponents.feeSelector.utils.FeeCalculationUtils.checkFeeCoverage +import com.tangem.features.send.api.subcomponents.notifications.SendNotificationsUpdateListener +import com.tangem.features.send.api.subcomponents.notifications.SendNotificationsUpdateTrigger +import com.tangem.features.send.subcomponents.notifications.analytics.NotificationsAnalyticEvents import com.tangem.lib.crypto.BlockchainUtils import com.tangem.lib.crypto.BlockchainUtils.isTron import com.tangem.utils.coroutines.CoroutineDispatcherProvider diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/notifications/ui/NotificationsContent.kt b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/notifications/ui/NotificationsContent.kt similarity index 96% rename from features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/notifications/ui/NotificationsContent.kt rename to features/send/impl/src/main/java/com/tangem/features/send/subcomponents/notifications/ui/NotificationsContent.kt index aa9dd0d609..1d8ad03406 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/notifications/ui/NotificationsContent.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/subcomponents/notifications/ui/NotificationsContent.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.subcomponents.notifications.ui +package com.tangem.features.send.subcomponents.notifications.ui import androidx.compose.foundation.layout.padding import androidx.compose.foundation.lazy.LazyListScope diff --git a/features/send-v2/impl/src/main/res/drawable/ic_send_hint_shape_12.xml b/features/send/impl/src/main/res/drawable/ic_send_hint_shape_12.xml similarity index 100% rename from features/send-v2/impl/src/main/res/drawable/ic_send_hint_shape_12.xml rename to features/send/impl/src/main/res/drawable/ic_send_hint_shape_12.xml diff --git a/features/send-v2/impl/src/test/java/com/tangem/features/send/v2/send/confirm/model/transformers/NFTSendConfirmationNotificationsTransformerV2Test.kt b/features/send/impl/src/test/java/com/tangem/features/send/v2/send/confirm/model/transformers/NFTSendConfirmationNotificationsTransformerV2Test.kt similarity index 96% rename from features/send-v2/impl/src/test/java/com/tangem/features/send/v2/send/confirm/model/transformers/NFTSendConfirmationNotificationsTransformerV2Test.kt rename to features/send/impl/src/test/java/com/tangem/features/send/v2/send/confirm/model/transformers/NFTSendConfirmationNotificationsTransformerV2Test.kt index c338f3ca59..394a9dc9e1 100644 --- a/features/send-v2/impl/src/test/java/com/tangem/features/send/v2/send/confirm/model/transformers/NFTSendConfirmationNotificationsTransformerV2Test.kt +++ b/features/send/impl/src/test/java/com/tangem/features/send/v2/send/confirm/model/transformers/NFTSendConfirmationNotificationsTransformerV2Test.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.send.confirm.model.transformers +package com.tangem.features.send.send.confirm.model.transformers import com.google.common.truth.Truth.assertThat import com.tangem.blockchain.common.Amount @@ -10,9 +10,14 @@ import com.tangem.domain.appcurrency.model.AppCurrency import com.tangem.domain.models.currency.CryptoCurrency import com.tangem.domain.models.currency.CryptoCurrencyStatus import com.tangem.domain.models.network.Network -import com.tangem.features.send.v2.api.entity.* -import com.tangem.features.send.v2.common.ui.state.ConfirmUM -import com.tangem.features.send.v2.sendnft.confirm.model.transformers.NFTSendConfirmationNotificationsTransformerV2 +import com.tangem.features.send.api.entity.CustomFeeFieldUM +import com.tangem.features.send.api.entity.FeeExtraInfo +import com.tangem.features.send.api.entity.FeeFiatRateUM +import com.tangem.features.send.api.entity.FeeItem +import com.tangem.features.send.api.entity.FeeNonce +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.common.ui.state.ConfirmUM +import com.tangem.features.send.sendnft.confirm.model.transformers.NFTSendConfirmationNotificationsTransformerV2 import io.mockk.mockk import io.mockk.verify import kotlinx.collections.immutable.persistentListOf diff --git a/features/send-v2/impl/src/test/java/com/tangem/features/send/v2/send/confirm/model/transformers/SendConfirmationNotificationsTransformerV2Test.kt b/features/send/impl/src/test/java/com/tangem/features/send/v2/send/confirm/model/transformers/SendConfirmationNotificationsTransformerV2Test.kt similarity index 97% rename from features/send-v2/impl/src/test/java/com/tangem/features/send/v2/send/confirm/model/transformers/SendConfirmationNotificationsTransformerV2Test.kt rename to features/send/impl/src/test/java/com/tangem/features/send/v2/send/confirm/model/transformers/SendConfirmationNotificationsTransformerV2Test.kt index aa166774b7..9694974592 100644 --- a/features/send-v2/impl/src/test/java/com/tangem/features/send/v2/send/confirm/model/transformers/SendConfirmationNotificationsTransformerV2Test.kt +++ b/features/send/impl/src/test/java/com/tangem/features/send/v2/send/confirm/model/transformers/SendConfirmationNotificationsTransformerV2Test.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.send.confirm.model.transformers +package com.tangem.features.send.send.confirm.model.transformers import com.google.common.truth.Truth.assertThat import com.tangem.blockchain.common.Amount @@ -12,8 +12,14 @@ import com.tangem.domain.appcurrency.model.AppCurrency import com.tangem.domain.models.currency.CryptoCurrency import com.tangem.domain.models.currency.CryptoCurrencyStatus import com.tangem.domain.models.network.Network -import com.tangem.features.send.v2.api.entity.* -import com.tangem.features.send.v2.common.ui.state.ConfirmUM +import com.tangem.features.send.api.entity.CustomFeeFieldUM +import com.tangem.features.send.api.entity.FeeExtraInfo +import com.tangem.features.send.api.entity.FeeFiatRateUM +import com.tangem.features.send.api.entity.FeeItem +import com.tangem.features.send.api.entity.FeeNonce +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.common.ui.state.ConfirmUM +import com.tangem.features.send.send.confirm.model.transformers.SendConfirmationNotificationsTransformerV2 import io.mockk.mockk import io.mockk.verify import kotlinx.collections.immutable.persistentListOf diff --git a/features/send-v2/impl/src/test/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/SendDestinationValidationResultTransformerTest.kt b/features/send/impl/src/test/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/SendDestinationValidationResultTransformerTest.kt similarity index 94% rename from features/send-v2/impl/src/test/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/SendDestinationValidationResultTransformerTest.kt rename to features/send/impl/src/test/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/SendDestinationValidationResultTransformerTest.kt index 38c6429a56..cc320a1341 100644 --- a/features/send-v2/impl/src/test/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/SendDestinationValidationResultTransformerTest.kt +++ b/features/send/impl/src/test/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/SendDestinationValidationResultTransformerTest.kt @@ -1,4 +1,4 @@ -package com.tangem.features.send.v2.subcomponents.destination.model.transformers +package com.tangem.features.send.subcomponents.destination.model.transformers import androidx.compose.foundation.text.KeyboardOptions import arrow.core.Either @@ -10,9 +10,10 @@ import com.tangem.core.ui.extensions.resourceReference import com.tangem.domain.transaction.error.AddressValidation import com.tangem.domain.transaction.error.AddressValidationResult import com.tangem.domain.transaction.error.ValidateMemoError -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationTextFieldUM -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationUM -import com.tangem.features.send.v2.impl.R +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationTextFieldUM +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationUM +import com.tangem.features.send.subcomponents.destination.model.transformers.SendDestinationValidationResultTransformer +import com.tangem.features.send.impl.R import kotlinx.collections.immutable.persistentListOf import org.junit.jupiter.api.Test diff --git a/features/swap-v2/api/build.gradle.kts b/features/swap-v2/api/build.gradle.kts index 6973365628..5531564fe6 100644 --- a/features/swap-v2/api/build.gradle.kts +++ b/features/swap-v2/api/build.gradle.kts @@ -13,7 +13,7 @@ dependencies { implementation(projects.core.decompose) implementation(projects.core.ui) - api(projects.features.sendV2.api) + api(projects.features.send.api) /** Common */ implementation(projects.common.ui) diff --git a/features/swap-v2/api/src/main/java/com/tangem/features/swap/v2/api/SendWithSwapComponent.kt b/features/swap-v2/api/src/main/java/com/tangem/features/swap/v2/api/SendWithSwapComponent.kt index ce7a97b04f..294ee4f82d 100644 --- a/features/swap-v2/api/src/main/java/com/tangem/features/swap/v2/api/SendWithSwapComponent.kt +++ b/features/swap-v2/api/src/main/java/com/tangem/features/swap/v2/api/SendWithSwapComponent.kt @@ -4,7 +4,7 @@ import com.tangem.core.decompose.factory.ComponentFactory import com.tangem.core.ui.decompose.ComposableContentComponent import com.tangem.domain.models.currency.CryptoCurrency import com.tangem.domain.models.wallet.UserWalletId -import com.tangem.features.send.v2.api.entry.SendEntryRoute +import com.tangem.features.send.api.entry.SendEntryRoute import kotlinx.coroutines.flow.StateFlow interface SendWithSwapComponent : ComposableContentComponent { diff --git a/features/swap-v2/impl/build.gradle.kts b/features/swap-v2/impl/build.gradle.kts index c38b459119..bab79b9a43 100644 --- a/features/swap-v2/impl/build.gradle.kts +++ b/features/swap-v2/impl/build.gradle.kts @@ -22,7 +22,7 @@ dependencies { /** Feature */ implementation(projects.features.swapV2.api) implementation(projects.features.manageTokens.api) - implementation(projects.features.sendV2.api) + implementation(projects.features.send.api) implementation(projects.features.commonFeatures.api) /** Core */ diff --git a/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/amount/SwapAmountComponentParams.kt b/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/amount/SwapAmountComponentParams.kt index bee0732784..50fc5eba87 100644 --- a/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/amount/SwapAmountComponentParams.kt +++ b/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/amount/SwapAmountComponentParams.kt @@ -7,7 +7,7 @@ import com.tangem.domain.models.currency.CryptoCurrency import com.tangem.domain.models.currency.CryptoCurrencyStatus import com.tangem.domain.models.wallet.UserWallet import com.tangem.domain.swap.models.SwapDirection -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents import com.tangem.features.swap.v2.impl.amount.entity.SwapAmountUM import com.tangem.features.swap.v2.impl.sendviaswap.SendWithSwapRoute import kotlinx.coroutines.flow.Flow diff --git a/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/amount/model/SwapAmountModel.kt b/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/amount/model/SwapAmountModel.kt index 2bcecfac64..ea54e5c2b3 100644 --- a/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/amount/model/SwapAmountModel.kt +++ b/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/amount/model/SwapAmountModel.kt @@ -37,8 +37,8 @@ import com.tangem.domain.tokens.GetMinimumTransactionAmountSyncUseCase import com.tangem.domain.transaction.models.AllowanceInfo import com.tangem.domain.transaction.usecase.GetAllowanceInfoUseCase import com.tangem.domain.wallets.usecase.GetWalletsUseCase -import com.tangem.features.send.v2.api.subcomponents.amount.analytics.CommonSendAmountAnalyticEvents -import com.tangem.features.send.v2.api.subcomponents.feeSelector.FeeSelectorReloadTrigger +import com.tangem.features.send.api.subcomponents.amount.analytics.CommonSendAmountAnalyticEvents +import com.tangem.features.send.api.subcomponents.feeSelector.FeeSelectorReloadTrigger import com.tangem.features.swap.v2.api.choosetoken.SwapChooseTokenNetworkListener import com.tangem.features.swap.v2.impl.R import com.tangem.features.swap.v2.impl.amount.SwapAmountBlockComponent.SwapChooseProviderConfig diff --git a/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/choosetoken/fromSupported/model/SwapChooseTokenNetworkModel.kt b/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/choosetoken/fromSupported/model/SwapChooseTokenNetworkModel.kt index 1567523f5c..767c44c058 100644 --- a/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/choosetoken/fromSupported/model/SwapChooseTokenNetworkModel.kt +++ b/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/choosetoken/fromSupported/model/SwapChooseTokenNetworkModel.kt @@ -13,7 +13,7 @@ import com.tangem.domain.swap.models.SwapTxType import com.tangem.domain.swap.usecase.GetSwapSupportedPairsUseCase import com.tangem.domain.wallets.usecase.GetUserWalletUseCase import com.tangem.features.managetokens.component.analytics.CommonManageTokensAnalyticEvents -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents import com.tangem.features.swap.v2.api.choosetoken.SwapChooseTokenNetworkComponent import com.tangem.features.swap.v2.impl.choosetoken.fromSupported.entity.SwapChooseTokenNetworkContentUM import com.tangem.features.swap.v2.impl.choosetoken.fromSupported.entity.SwapChooseTokenNetworkUM diff --git a/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/common/entity/ConfirmUM.kt b/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/common/entity/ConfirmUM.kt index 8be7f8fc02..f99651def0 100644 --- a/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/common/entity/ConfirmUM.kt +++ b/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/common/entity/ConfirmUM.kt @@ -5,8 +5,8 @@ import com.tangem.common.ui.notifications.NotificationUM import com.tangem.core.ui.extensions.TextReference import com.tangem.domain.express.models.ExpressProvider import com.tangem.domain.swap.models.SwapDataModel -import com.tangem.features.send.v2.api.entity.FeeSelectorUM -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationUM +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationUM import com.tangem.features.swap.v2.impl.amount.entity.SwapAmountUM import kotlinx.collections.immutable.ImmutableList diff --git a/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/DefaultSendWithSwapComponent.kt b/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/DefaultSendWithSwapComponent.kt index 2a845f5472..d6e438be46 100644 --- a/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/DefaultSendWithSwapComponent.kt +++ b/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/DefaultSendWithSwapComponent.kt @@ -22,10 +22,10 @@ import com.tangem.core.ui.decompose.ComposableContentComponent import com.tangem.core.ui.extensions.resourceReference import com.tangem.domain.swap.models.R import com.tangem.domain.swap.models.SwapDirection -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents -import com.tangem.features.send.v2.api.subcomponents.destination.DestinationRoute -import com.tangem.features.send.v2.api.subcomponents.destination.SendDestinationComponent -import com.tangem.features.send.v2.api.subcomponents.destination.SendDestinationComponentParams +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents +import com.tangem.features.send.api.subcomponents.destination.DestinationRoute +import com.tangem.features.send.api.subcomponents.destination.SendDestinationComponent +import com.tangem.features.send.api.subcomponents.destination.SendDestinationComponentParams import com.tangem.features.swap.v2.api.SendWithSwapComponent import com.tangem.features.swap.v2.impl.amount.SwapAmountComponent import com.tangem.features.swap.v2.impl.amount.SwapAmountComponentParams diff --git a/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/SendWithSwapRoute.kt b/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/SendWithSwapRoute.kt index 3f0b9b70be..09a864c858 100644 --- a/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/SendWithSwapRoute.kt +++ b/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/SendWithSwapRoute.kt @@ -1,7 +1,7 @@ package com.tangem.features.swap.v2.impl.sendviaswap import com.tangem.core.decompose.navigation.Route -import com.tangem.features.send.v2.api.subcomponents.destination.DestinationRoute +import com.tangem.features.send.api.subcomponents.destination.DestinationRoute import com.tangem.features.swap.v2.impl.amount.SwapAmountRoute import kotlinx.serialization.Serializable diff --git a/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/analytics/SendWithSwapAnalyticEvents.kt b/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/analytics/SendWithSwapAnalyticEvents.kt index e51dca3a75..dafce5eca8 100644 --- a/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/analytics/SendWithSwapAnalyticEvents.kt +++ b/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/analytics/SendWithSwapAnalyticEvents.kt @@ -15,7 +15,7 @@ import com.tangem.core.analytics.models.AnalyticsParam.Key.SEND_TOKEN import com.tangem.core.analytics.models.AppsFlyerIncludedEvent import com.tangem.domain.express.models.ExpressRateType import com.tangem.domain.models.currency.CryptoCurrency -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents internal sealed class SendWithSwapAnalyticEvents( event: String, diff --git a/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/confirm/SendWithSwapConfirmComponent.kt b/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/confirm/SendWithSwapConfirmComponent.kt index 332b0b63f3..467a6f134b 100644 --- a/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/confirm/SendWithSwapConfirmComponent.kt +++ b/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/confirm/SendWithSwapConfirmComponent.kt @@ -14,13 +14,13 @@ import com.tangem.domain.models.account.Account import com.tangem.domain.models.currency.CryptoCurrencyStatus import com.tangem.domain.models.wallet.UserWallet import com.tangem.domain.swap.models.SwapDirection -import com.tangem.features.send.v2.api.FeeSelectorBlockComponent -import com.tangem.features.send.v2.api.SendNotificationsComponent -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents -import com.tangem.features.send.v2.api.entity.PredefinedValues -import com.tangem.features.send.v2.api.params.FeeSelectorParams.* -import com.tangem.features.send.v2.api.subcomponents.destination.SendDestinationBlockComponent -import com.tangem.features.send.v2.api.subcomponents.destination.SendDestinationComponentParams +import com.tangem.features.send.api.FeeSelectorBlockComponent +import com.tangem.features.send.api.SendNotificationsComponent +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents +import com.tangem.features.send.api.entity.PredefinedValues +import com.tangem.features.send.api.params.FeeSelectorParams.* +import com.tangem.features.send.api.subcomponents.destination.SendDestinationBlockComponent +import com.tangem.features.send.api.subcomponents.destination.SendDestinationComponentParams import com.tangem.features.swap.v2.impl.amount.SwapAmountBlockComponent import com.tangem.features.swap.v2.impl.amount.SwapAmountComponentParams import com.tangem.features.swap.v2.impl.common.SwapUtils.SEND_WITH_SWAP_PROVIDER_TYPES diff --git a/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/confirm/model/SendWithSwapConfirmModel.kt b/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/confirm/model/SendWithSwapConfirmModel.kt index ad6eac10b6..cd90496629 100644 --- a/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/confirm/model/SendWithSwapConfirmModel.kt +++ b/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/confirm/model/SendWithSwapConfirmModel.kt @@ -37,16 +37,16 @@ import com.tangem.domain.transaction.usecase.EstimateFeeUseCase import com.tangem.domain.transaction.usecase.gasless.EstimateFeeForGaslessTxUseCase import com.tangem.domain.transaction.usecase.gasless.EstimateFeeForTokenUseCase import com.tangem.domain.txhistory.usecase.GetExplorerTransactionUrlUseCase -import com.tangem.features.send.v2.api.SendNotificationsComponent -import com.tangem.features.send.v2.api.SendNotificationsComponent.Params.NotificationData -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents.SendScreenSource -import com.tangem.features.send.v2.api.callbacks.FeeSelectorModelCallback -import com.tangem.features.send.v2.api.entity.FeeSelectorUM -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationUM -import com.tangem.features.send.v2.api.subcomponents.feeSelector.FeeSelectorReloadTrigger -import com.tangem.features.send.v2.api.subcomponents.notifications.SendNotificationsUpdateListener -import com.tangem.features.send.v2.api.subcomponents.notifications.SendNotificationsUpdateTrigger +import com.tangem.features.send.api.SendNotificationsComponent +import com.tangem.features.send.api.SendNotificationsComponent.Params.NotificationData +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents.SendScreenSource +import com.tangem.features.send.api.callbacks.FeeSelectorModelCallback +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationUM +import com.tangem.features.send.api.subcomponents.feeSelector.FeeSelectorReloadTrigger +import com.tangem.features.send.api.subcomponents.notifications.SendNotificationsUpdateListener +import com.tangem.features.send.api.subcomponents.notifications.SendNotificationsUpdateTrigger import com.tangem.features.swap.v2.api.subcomponents.SwapAmountUpdateTrigger import com.tangem.features.swap.v2.impl.R import com.tangem.features.swap.v2.impl.amount.SwapAmountReduceTrigger @@ -75,7 +75,7 @@ import jakarta.inject.Inject import kotlinx.coroutines.flow.* import kotlinx.coroutines.launch import java.math.BigDecimal -import com.tangem.features.send.v2.api.entity.FeeSelectorUM as FeeSelectorUMRedesigned +import com.tangem.features.send.api.entity.FeeSelectorUM as FeeSelectorUMRedesigned import com.tangem.utils.transformer.update as transformerUpdate @Suppress("LongParameterList", "LargeClass") diff --git a/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/confirm/model/SwapTransactionSender.kt b/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/confirm/model/SwapTransactionSender.kt index bfe0696e43..3d246ec962 100644 --- a/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/confirm/model/SwapTransactionSender.kt +++ b/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/confirm/model/SwapTransactionSender.kt @@ -23,7 +23,7 @@ import com.tangem.domain.transaction.usecase.CreateTransferTransactionUseCase import com.tangem.domain.transaction.usecase.SendTransactionUseCase import com.tangem.domain.transaction.usecase.gasless.CreateAndSendGaslessTransactionUseCase import com.tangem.domain.utils.convertToSdkAmount -import com.tangem.features.send.v2.api.subcomponents.feeSelector.utils.FeeCalculationUtils +import com.tangem.features.send.api.subcomponents.feeSelector.utils.FeeCalculationUtils import com.tangem.features.swap.v2.impl.common.ConfirmData import com.tangem.features.swap.v2.impl.common.entity.SwapQuoteUM import com.tangem.utils.logging.TangemLogger diff --git a/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/confirm/model/transformers/SendWithSwapConfirmationNotificationsTransformer.kt b/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/confirm/model/transformers/SendWithSwapConfirmationNotificationsTransformer.kt index 53fd2df373..b274568ef8 100644 --- a/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/confirm/model/transformers/SendWithSwapConfirmationNotificationsTransformer.kt +++ b/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/confirm/model/transformers/SendWithSwapConfirmationNotificationsTransformer.kt @@ -10,11 +10,11 @@ import com.tangem.core.ui.extensions.wrappedList import com.tangem.core.ui.format.bigdecimal.fiat import com.tangem.core.ui.format.bigdecimal.format import com.tangem.domain.swap.models.SwapDirection.Companion.withSwapDirection -import com.tangem.features.send.v2.api.entity.FeeSelectorUM -import com.tangem.features.send.v2.api.subcomponents.feeSelector.utils.FeeCalculationUtils.checkIfCustomFeeTooHigh -import com.tangem.features.send.v2.api.subcomponents.feeSelector.utils.FeeCalculationUtils.checkIfCustomFeeTooLow -import com.tangem.features.send.v2.api.utils.formatFooterFiatFee -import com.tangem.features.send.v2.api.utils.getTronTokenFeeSendingText +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.api.subcomponents.feeSelector.utils.FeeCalculationUtils.checkIfCustomFeeTooHigh +import com.tangem.features.send.api.subcomponents.feeSelector.utils.FeeCalculationUtils.checkIfCustomFeeTooLow +import com.tangem.features.send.api.utils.formatFooterFiatFee +import com.tangem.features.send.api.utils.getTronTokenFeeSendingText import com.tangem.features.swap.v2.impl.R import com.tangem.features.swap.v2.impl.amount.entity.SwapAmountUM import com.tangem.features.swap.v2.impl.common.entity.ConfirmUM diff --git a/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/confirm/ui/SendWithSwapConfirmContent.kt b/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/confirm/ui/SendWithSwapConfirmContent.kt index 7005c6acdf..7f3cb239cf 100644 --- a/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/confirm/ui/SendWithSwapConfirmContent.kt +++ b/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/confirm/ui/SendWithSwapConfirmContent.kt @@ -12,9 +12,9 @@ import androidx.compose.ui.unit.dp import com.tangem.common.ui.notifications.NotificationUM import com.tangem.common.ui.notifications.notifications import com.tangem.core.ui.components.SpacerH16 -import com.tangem.features.send.v2.api.FeeSelectorBlockComponent -import com.tangem.features.send.v2.api.SendNotificationsComponent -import com.tangem.features.send.v2.api.subcomponents.destination.SendDestinationBlockComponent +import com.tangem.features.send.api.FeeSelectorBlockComponent +import com.tangem.features.send.api.SendNotificationsComponent +import com.tangem.features.send.api.subcomponents.destination.SendDestinationBlockComponent import com.tangem.features.swap.v2.impl.amount.SwapAmountBlockComponent import com.tangem.features.swap.v2.impl.common.entity.ConfirmUM import com.tangem.features.swap.v2.impl.notifications.SwapNotificationsComponent diff --git a/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/entity/SendWithSwapUM.kt b/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/entity/SendWithSwapUM.kt index 1a576345a6..5c9d623672 100644 --- a/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/entity/SendWithSwapUM.kt +++ b/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/entity/SendWithSwapUM.kt @@ -1,8 +1,8 @@ package com.tangem.features.swap.v2.impl.sendviaswap.entity import com.tangem.common.ui.navigationButtons.NavigationUM -import com.tangem.features.send.v2.api.entity.FeeSelectorUM -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationUM +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationUM import com.tangem.features.swap.v2.impl.amount.entity.SwapAmountUM import com.tangem.features.swap.v2.impl.common.entity.ConfirmUM diff --git a/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/model/SendWithSwapModel.kt b/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/model/SendWithSwapModel.kt index e991accc0c..b8196ae1b3 100644 --- a/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/model/SendWithSwapModel.kt +++ b/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/model/SendWithSwapModel.kt @@ -19,10 +19,10 @@ import com.tangem.domain.models.currency.CryptoCurrencyStatus import com.tangem.domain.models.wallet.UserWallet import com.tangem.domain.swap.models.SwapDirection import com.tangem.domain.wallets.usecase.GetUserWalletUseCase -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents -import com.tangem.features.send.v2.api.entity.FeeSelectorUM -import com.tangem.features.send.v2.api.subcomponents.destination.SendDestinationComponent -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationUM +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.api.subcomponents.destination.SendDestinationComponent +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationUM import com.tangem.features.swap.v2.api.SendWithSwapComponent import com.tangem.features.swap.v2.impl.amount.SwapAmountComponent import com.tangem.features.swap.v2.impl.amount.entity.SwapAmountUM diff --git a/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/success/ui/SendWithSwapSuccessContent.kt b/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/success/ui/SendWithSwapSuccessContent.kt index 8acb32e4a7..2ecf5eeb36 100644 --- a/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/success/ui/SendWithSwapSuccessContent.kt +++ b/features/swap-v2/impl/src/main/java/com/tangem/features/swap/v2/impl/sendviaswap/success/ui/SendWithSwapSuccessContent.kt @@ -45,12 +45,12 @@ import com.tangem.domain.express.models.ExpressProviderType import com.tangem.domain.swap.models.SwapDataModel import com.tangem.domain.swap.models.SwapDataTransactionModel import com.tangem.domain.utils.convertToSdkAmount -import com.tangem.features.send.v2.api.entity.FeeExtraInfo -import com.tangem.features.send.v2.api.entity.FeeItem -import com.tangem.features.send.v2.api.entity.FeeNonce -import com.tangem.features.send.v2.api.entity.FeeSelectorUM -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationTextFieldUM -import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationUM +import com.tangem.features.send.api.entity.FeeExtraInfo +import com.tangem.features.send.api.entity.FeeItem +import com.tangem.features.send.api.entity.FeeNonce +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationTextFieldUM +import com.tangem.features.send.api.subcomponents.destination.entity.DestinationUM import com.tangem.features.swap.v2.impl.R import com.tangem.features.swap.v2.impl.amount.entity.SwapAmountFieldUM import com.tangem.features.swap.v2.impl.amount.entity.SwapAmountUM diff --git a/features/swap/domain/build.gradle.kts b/features/swap/domain/build.gradle.kts index 78c1bc3f3d..13530ac93f 100644 --- a/features/swap/domain/build.gradle.kts +++ b/features/swap/domain/build.gradle.kts @@ -64,7 +64,7 @@ dependencies { implementation(projects.features.swap.api) implementation(projects.features.swap.domain.api) implementation(projects.features.swap.domain.models) - implementation(projects.features.sendV2.api) + implementation(projects.features.send.api) implementation(projects.libs.blockchainSdk) /** Other Libraries **/ diff --git a/features/swap/domain/src/main/java/com/tangem/feature/swap/domain/transfer/SwapTransferInteractorImpl.kt b/features/swap/domain/src/main/java/com/tangem/feature/swap/domain/transfer/SwapTransferInteractorImpl.kt index d9e91edffc..ff071510a7 100644 --- a/features/swap/domain/src/main/java/com/tangem/feature/swap/domain/transfer/SwapTransferInteractorImpl.kt +++ b/features/swap/domain/src/main/java/com/tangem/feature/swap/domain/transfer/SwapTransferInteractorImpl.kt @@ -40,8 +40,8 @@ import com.tangem.feature.swap.domain.fee.TransactionFeeResult import com.tangem.feature.swap.domain.models.SwapAmount import com.tangem.feature.swap.domain.models.ui.SwapState import com.tangem.feature.swap.domain.models.ui.TokenSwapInfo -import com.tangem.features.send.v2.api.subcomponents.feeSelector.utils.FeeCalculationUtils.checkAndCalculateSubtractedAmount -import com.tangem.features.send.v2.api.subcomponents.feeSelector.utils.FeeCalculationUtils.checkFeeCoverage +import com.tangem.features.send.api.subcomponents.feeSelector.utils.FeeCalculationUtils.checkAndCalculateSubtractedAmount +import com.tangem.features.send.api.subcomponents.feeSelector.utils.FeeCalculationUtils.checkFeeCoverage import com.tangem.features.swap.SwapFeatureToggles import com.tangem.utils.extensions.orZero import kotlinx.coroutines.flow.first diff --git a/features/swap/impl/build.gradle.kts b/features/swap/impl/build.gradle.kts index 50bee6c624..c8c67e303c 100644 --- a/features/swap/impl/build.gradle.kts +++ b/features/swap/impl/build.gradle.kts @@ -67,8 +67,8 @@ dependencies { implementation(projects.features.swap.domain.models) implementation(projects.features.wallet.api) implementation(projects.features.swap.api) - implementation(projects.features.sendV2.api) - implementation(projects.features.sendV2.impl) + implementation(projects.features.send.api) + implementation(projects.features.send.impl) implementation(projects.features.feed.api) /** AndroidX */ diff --git a/features/swap/impl/src/main/java/com/tangem/feature/swap/DefaultSwapComponent.kt b/features/swap/impl/src/main/java/com/tangem/feature/swap/DefaultSwapComponent.kt index fd54279f0c..521975fd77 100644 --- a/features/swap/impl/src/main/java/com/tangem/feature/swap/DefaultSwapComponent.kt +++ b/features/swap/impl/src/main/java/com/tangem/feature/swap/DefaultSwapComponent.kt @@ -31,7 +31,7 @@ import com.tangem.feature.swap.ui.SwapScreen import com.tangem.feature.swap.ui.SwapSuccessScreen import com.tangem.features.approval.api.GiveApprovalEntryComponent import com.tangem.features.commonfeatures.api.choosetoken.ChooseTokenComponent -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents import com.tangem.features.swap.SwapComponent import com.tangem.utils.isNullOrZero import com.tangem.utils.logging.TangemLogger diff --git a/features/swap/impl/src/main/java/com/tangem/feature/swap/component/SwapFeeSelectorBlockComponent.kt b/features/swap/impl/src/main/java/com/tangem/feature/swap/component/SwapFeeSelectorBlockComponent.kt index 7607eafad4..59a76db3af 100644 --- a/features/swap/impl/src/main/java/com/tangem/feature/swap/component/SwapFeeSelectorBlockComponent.kt +++ b/features/swap/impl/src/main/java/com/tangem/feature/swap/component/SwapFeeSelectorBlockComponent.kt @@ -12,10 +12,10 @@ import com.tangem.domain.models.currency.CryptoCurrencyStatus import com.tangem.domain.models.wallet.UserWalletId import com.tangem.domain.transaction.error.GetFeeError import com.tangem.domain.transaction.models.TransactionFeeExtended -import com.tangem.features.send.v2.api.FeeSelectorBlockComponent -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents -import com.tangem.features.send.v2.api.entity.FeeSelectorUM -import com.tangem.features.send.v2.api.params.FeeSelectorParams +import com.tangem.features.send.api.FeeSelectorBlockComponent +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.api.params.FeeSelectorParams import dagger.assisted.Assisted import dagger.assisted.AssistedFactory import dagger.assisted.AssistedInject diff --git a/features/swap/impl/src/main/java/com/tangem/feature/swap/model/SwapModel.kt b/features/swap/impl/src/main/java/com/tangem/feature/swap/model/SwapModel.kt index 72ddde1399..92d6de4307 100644 --- a/features/swap/impl/src/main/java/com/tangem/feature/swap/model/SwapModel.kt +++ b/features/swap/impl/src/main/java/com/tangem/feature/swap/model/SwapModel.kt @@ -105,9 +105,9 @@ import com.tangem.features.approval.api.SelectApprovalTypeComponent import com.tangem.features.commonfeatures.api.choosetoken.ChooseTokenAnalyticsPayload import com.tangem.features.commonfeatures.api.choosetoken.ChooseTokenBridge import com.tangem.features.commonfeatures.api.choosetoken.ChooseTokenResult -import com.tangem.features.send.v2.api.entity.FeeItem -import com.tangem.features.send.v2.api.entity.FeeSelectorUM -import com.tangem.features.send.v2.api.subcomponents.feeSelector.FeeSelectorReloadTrigger +import com.tangem.features.send.api.entity.FeeItem +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.api.subcomponents.feeSelector.FeeSelectorReloadTrigger import com.tangem.features.swap.SwapComponent import com.tangem.features.swap.SwapFeatureToggles import com.tangem.utils.Provider diff --git a/features/swap/impl/src/main/java/com/tangem/feature/swap/ui/StateBuilder.kt b/features/swap/impl/src/main/java/com/tangem/feature/swap/ui/StateBuilder.kt index 18be642bb1..ee43b3078f 100644 --- a/features/swap/impl/src/main/java/com/tangem/feature/swap/ui/StateBuilder.kt +++ b/features/swap/impl/src/main/java/com/tangem/feature/swap/ui/StateBuilder.kt @@ -43,7 +43,7 @@ import com.tangem.feature.swap.models.SwapButton.Mode import com.tangem.feature.swap.models.states.* import com.tangem.feature.swap.presentation.R import com.tangem.feature.swap.utils.formatToUIRepresentation -import com.tangem.features.send.v2.api.entity.FeeSelectorUM +import com.tangem.features.send.api.entity.FeeSelectorUM import com.tangem.features.swap.SwapFeatureToggles import com.tangem.utils.Provider import com.tangem.utils.StringsSigns diff --git a/features/swap/impl/src/main/java/com/tangem/feature/swap/ui/SwapSuccessScreen.kt b/features/swap/impl/src/main/java/com/tangem/feature/swap/ui/SwapSuccessScreen.kt index b29b7c72c9..8ae7903d5d 100644 --- a/features/swap/impl/src/main/java/com/tangem/feature/swap/ui/SwapSuccessScreen.kt +++ b/features/swap/impl/src/main/java/com/tangem/feature/swap/ui/SwapSuccessScreen.kt @@ -29,8 +29,8 @@ import com.tangem.core.ui.utils.toTimeFormat import com.tangem.feature.swap.models.SwapSuccessStateHolder import com.tangem.feature.swap.presentation.R import com.tangem.feature.swap.preview.SwapSuccessStatePreview -import com.tangem.features.send.v2.api.entity.FeeSelectorUM -import com.tangem.features.send.v2.common.ui.FeeBlockSuccess +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.common.ui.FeeBlockSuccess @Composable fun SwapSuccessScreen(state: SwapSuccessStateHolder, feeSelectorUM: FeeSelectorUM?, onBack: () -> Unit) { diff --git a/features/swap/impl/src/main/java/com/tangem/feature/swap/ui/transfer/SwapTransferStateBuilder.kt b/features/swap/impl/src/main/java/com/tangem/feature/swap/ui/transfer/SwapTransferStateBuilder.kt index aca4366462..992242fb67 100644 --- a/features/swap/impl/src/main/java/com/tangem/feature/swap/ui/transfer/SwapTransferStateBuilder.kt +++ b/features/swap/impl/src/main/java/com/tangem/feature/swap/ui/transfer/SwapTransferStateBuilder.kt @@ -29,8 +29,8 @@ import com.tangem.feature.swap.models.* import com.tangem.feature.swap.models.SwapButton.Mode import com.tangem.feature.swap.models.states.SwapNotificationUM import com.tangem.feature.swap.presentation.R -import com.tangem.features.send.v2.api.utils.formatFooterFiatFee -import com.tangem.features.send.v2.api.utils.getTronTokenFeeSendingText +import com.tangem.features.send.api.utils.formatFooterFiatFee +import com.tangem.features.send.api.utils.getTronTokenFeeSendingText import com.tangem.utils.StringsSigns.DASH_SIGN import kotlinx.collections.immutable.ImmutableList import java.math.BigDecimal @@ -306,9 +306,9 @@ internal class SwapTransferStateBuilder @Inject constructor( } else { resourceReference( id = if (isFeeConvertibleToFiat) { - com.tangem.features.send.v2.impl.R.string.send_summary_transaction_description + com.tangem.features.send.impl.R.string.send_summary_transaction_description } else { - com.tangem.features.send.v2.impl.R.string.send_summary_transaction_description_no_fiat_fee + com.tangem.features.send.impl.R.string.send_summary_transaction_description_no_fiat_fee }, formatArgs = wrappedList(fiatSending, fiatFee), ) diff --git a/features/swap/impl/src/test/java/com/tangem/feature/swap/StateBuilderSwapButtonTest.kt b/features/swap/impl/src/test/java/com/tangem/feature/swap/StateBuilderSwapButtonTest.kt index 184a9aa6a3..87b6790953 100644 --- a/features/swap/impl/src/test/java/com/tangem/feature/swap/StateBuilderSwapButtonTest.kt +++ b/features/swap/impl/src/test/java/com/tangem/feature/swap/StateBuilderSwapButtonTest.kt @@ -24,7 +24,6 @@ import com.tangem.feature.swap.domain.models.domain.* import com.tangem.feature.swap.domain.models.ui.* import com.tangem.feature.swap.models.* import com.tangem.feature.swap.ui.StateBuilder -import com.tangem.features.send.v2.api.entity.FeeSelectorUM import com.tangem.features.swap.SwapFeatureToggles import com.tangem.utils.Provider import io.mockk.every diff --git a/features/swap/impl/src/test/java/com/tangem/feature/swap/model/SwapModelApprovalSelectorCallbackTest.kt b/features/swap/impl/src/test/java/com/tangem/feature/swap/model/SwapModelApprovalSelectorCallbackTest.kt index ce37543e6c..d1518baeda 100644 --- a/features/swap/impl/src/test/java/com/tangem/feature/swap/model/SwapModelApprovalSelectorCallbackTest.kt +++ b/features/swap/impl/src/test/java/com/tangem/feature/swap/model/SwapModelApprovalSelectorCallbackTest.kt @@ -3,7 +3,7 @@ package com.tangem.feature.swap.model import com.google.common.truth.Truth.assertThat import com.tangem.common.ui.bottomsheet.permission.state.ApproveType import com.tangem.feature.swap.domain.models.ui.PermissionDataState -import com.tangem.features.send.v2.api.entity.FeeSelectorUM +import com.tangem.features.send.api.entity.FeeSelectorUM import io.mockk.coVerify import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.runTest diff --git a/features/swap/impl/src/test/java/com/tangem/feature/swap/model/SwapModelHandleFeeErrorTest.kt b/features/swap/impl/src/test/java/com/tangem/feature/swap/model/SwapModelHandleFeeErrorTest.kt index 748075ce2b..03c4242987 100644 --- a/features/swap/impl/src/test/java/com/tangem/feature/swap/model/SwapModelHandleFeeErrorTest.kt +++ b/features/swap/impl/src/test/java/com/tangem/feature/swap/model/SwapModelHandleFeeErrorTest.kt @@ -6,7 +6,7 @@ import com.tangem.core.analytics.models.AnalyticsEvent import com.tangem.domain.transaction.error.GetFeeError import com.tangem.feature.swap.analytics.SwapEvents import com.tangem.feature.swap.domain.models.ui.PermissionDataState -import com.tangem.features.send.v2.api.entity.FeeSelectorUM +import com.tangem.features.send.api.entity.FeeSelectorUM import io.mockk.coVerify import io.mockk.verify import kotlinx.coroutines.ExperimentalCoroutinesApi diff --git a/features/swap/impl/src/test/java/com/tangem/feature/swap/model/SwapModelTestBase.kt b/features/swap/impl/src/test/java/com/tangem/feature/swap/model/SwapModelTestBase.kt index 1cb86959b5..b7056e4aa5 100644 --- a/features/swap/impl/src/test/java/com/tangem/feature/swap/model/SwapModelTestBase.kt +++ b/features/swap/impl/src/test/java/com/tangem/feature/swap/model/SwapModelTestBase.kt @@ -29,7 +29,6 @@ import com.tangem.domain.stories.ShouldShowStoriesUseCase import com.tangem.domain.swap.models.SwapCurrencyStatus import com.tangem.domain.swap.usecase.CalculateAmountUseCase import com.tangem.domain.tangempay.GetTangemPayCustomerIdUseCase -import com.tangem.domain.tangempay.TangemPayWithdrawUseCase import com.tangem.domain.tangempay.TangemPayWithdrawWithSwapUseCase import com.tangem.domain.tokens.GetMinimumTransactionAmountSyncUseCase import com.tangem.domain.tokens.UpdateDelayedNetworkStatusUseCase @@ -47,7 +46,7 @@ import com.tangem.feature.swap.domain.models.ui.SwapState import com.tangem.feature.swap.domain.transfer.SwapTransferInteractor import com.tangem.feature.swap.ui.transfer.SwapTransferStateBuilder import com.tangem.features.commonfeatures.api.choosetoken.ChooseTokenBridge -import com.tangem.features.send.v2.api.subcomponents.feeSelector.FeeSelectorReloadTrigger +import com.tangem.features.send.api.subcomponents.feeSelector.FeeSelectorReloadTrigger import com.tangem.features.swap.SwapComponent import com.tangem.features.swap.SwapFeatureToggles import com.tangem.utils.coroutines.TestingCoroutineDispatcherProvider @@ -55,7 +54,6 @@ import io.mockk.coEvery import io.mockk.every import io.mockk.mockk import kotlinx.coroutines.channels.Channel -import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.emptyFlow /** diff --git a/features/swap/impl/src/test/java/com/tangem/feature/swap/ui/transfer/SwapTransferStateBuilderTest.kt b/features/swap/impl/src/test/java/com/tangem/feature/swap/ui/transfer/SwapTransferStateBuilderTest.kt index 16bddb47cc..6b2e8b161e 100644 --- a/features/swap/impl/src/test/java/com/tangem/feature/swap/ui/transfer/SwapTransferStateBuilderTest.kt +++ b/features/swap/impl/src/test/java/com/tangem/feature/swap/ui/transfer/SwapTransferStateBuilderTest.kt @@ -374,10 +374,10 @@ internal class SwapTransferStateBuilderTest { assertThat(refs).hasSize(3) assertThat(refs[0]).isInstanceOf(TextReference.Res::class.java) assertThat((refs[0] as TextReference.Res).id) - .isEqualTo(com.tangem.features.send.v2.api.R.string.send_summary_transaction_description_prefix) + .isEqualTo(com.tangem.features.send.api.R.string.send_summary_transaction_description_prefix) assertThat(refs[2]).isInstanceOf(TextReference.Res::class.java) assertThat((refs[2] as TextReference.Res).id) - .isEqualTo(com.tangem.features.send.v2.api.R.string.send_summary_transaction_description_suffix_fee_covered) + .isEqualTo(com.tangem.features.send.api.R.string.send_summary_transaction_description_suffix_fee_covered) } @Test @@ -422,7 +422,7 @@ internal class SwapTransferStateBuilderTest { assertThat(result.transferFooter).isEqualTo( resourceReference( - id = com.tangem.features.send.v2.impl.R.string.send_summary_transaction_description, + id = com.tangem.features.send.impl.R.string.send_summary_transaction_description, formatArgs = wrappedList(expectedFiatSending, expectedFiatFee), ), ) @@ -467,7 +467,7 @@ internal class SwapTransferStateBuilderTest { assertThat(result.transferFooter).isEqualTo( resourceReference( - id = com.tangem.features.send.v2.impl.R.string.send_summary_transaction_description_no_fiat_fee, + id = com.tangem.features.send.impl.R.string.send_summary_transaction_description_no_fiat_fee, formatArgs = wrappedList(expectedFiatSending, expectedFiatFee), ), ) diff --git a/features/tokendetails/impl/build.gradle.kts b/features/tokendetails/impl/build.gradle.kts index 919c98bb26..7e2dcc93f9 100644 --- a/features/tokendetails/impl/build.gradle.kts +++ b/features/tokendetails/impl/build.gradle.kts @@ -104,7 +104,7 @@ dependencies { implementation(projects.features.pushNotifications.api) implementation(projects.features.swap.api) implementation(projects.features.txhistory.api) - implementation(projects.features.sendV2.api) + implementation(projects.features.send.api) implementation(projects.features.tokenRecieve.api) implementation(projects.features.yieldSupply.api) implementation(projects.features.commonFeatures.api) diff --git a/features/wallet/impl/build.gradle.kts b/features/wallet/impl/build.gradle.kts index 755189ec2a..5e5d98d1d6 100644 --- a/features/wallet/impl/build.gradle.kts +++ b/features/wallet/impl/build.gradle.kts @@ -145,7 +145,7 @@ dependencies { implementation(projects.features.walletSettings.api) implementation(projects.features.biometry.api) implementation(projects.features.nft.api) - implementation(projects.features.sendV2.api) + implementation(projects.features.send.api) implementation(projects.features.kyc.api) implementation(projects.features.tokenRecieve.api) implementation(projects.features.yieldSupply.api) diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/child/wallet/WalletComponent.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/child/wallet/WalletComponent.kt index e3a9cee814..3c96432264 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/child/wallet/WalletComponent.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/child/wallet/WalletComponent.kt @@ -41,7 +41,7 @@ import com.tangem.features.feed.entry.components.FeedEntryComponent import com.tangem.features.promobanners.api.PromoBannersBlockComponent import com.tangem.features.pushnotifications.api.PushNotificationsBottomSheetComponent import com.tangem.features.pushnotifications.api.PushNotificationsParams -import com.tangem.features.send.v2.api.NetworkSelectionComponent +import com.tangem.features.send.api.NetworkSelectionComponent import com.tangem.features.tangempay.component.TangemPayMainBlockComponent import com.tangem.features.tangempay.components.TangemPayTransactionBottomSheetComponent import com.tangem.features.tokenreceive.TokenReceiveComponent diff --git a/features/walletconnect/impl/build.gradle.kts b/features/walletconnect/impl/build.gradle.kts index 7dec8b44da..dba2cb74f3 100644 --- a/features/walletconnect/impl/build.gradle.kts +++ b/features/walletconnect/impl/build.gradle.kts @@ -15,7 +15,7 @@ dependencies { implementation(projects.features.commonFeatures.api) implementation(projects.features.wallet.api) implementation(projects.features.walletconnect.api) - implementation(projects.features.sendV2.api) + implementation(projects.features.send.api) /** Common */ implementation(projects.common.routing) diff --git a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/connections/routing/DefaultWcRoutingComponent.kt b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/connections/routing/DefaultWcRoutingComponent.kt index ca9fe402ed..7d579aa7b1 100644 --- a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/connections/routing/DefaultWcRoutingComponent.kt +++ b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/connections/routing/DefaultWcRoutingComponent.kt @@ -15,8 +15,8 @@ import com.tangem.core.decompose.context.childByContext import com.tangem.core.decompose.model.getOrCreateModel import com.tangem.core.ui.decompose.ComposableContentComponent import com.tangem.features.commonfeatures.api.portfolioselector.PortfolioSelectorComponent -import com.tangem.features.send.v2.api.FeeSelectorBlockComponent -import com.tangem.features.send.v2.api.FeeSelectorComponent +import com.tangem.features.send.api.FeeSelectorBlockComponent +import com.tangem.features.send.api.FeeSelectorComponent import com.tangem.features.walletconnect.components.WcRoutingComponent import com.tangem.features.walletconnect.connections.components.AlertsComponent import com.tangem.features.walletconnect.connections.components.AlertsComponent.AlertType.* diff --git a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/components/PreviewFeeSelectorBlockComponent.kt b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/components/PreviewFeeSelectorBlockComponent.kt index fe864a450f..9aa7cdf947 100644 --- a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/components/PreviewFeeSelectorBlockComponent.kt +++ b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/components/PreviewFeeSelectorBlockComponent.kt @@ -17,8 +17,8 @@ import com.tangem.core.ui.components.audits.AuditLabelUM import com.tangem.core.ui.extensions.stringReference import com.tangem.core.ui.extensions.stringResourceSafe import com.tangem.core.ui.res.TangemTheme -import com.tangem.features.send.v2.api.FeeSelectorBlockComponent -import com.tangem.features.send.v2.api.entity.FeeSelectorUM +import com.tangem.features.send.api.FeeSelectorBlockComponent +import com.tangem.features.send.api.entity.FeeSelectorUM import com.tangem.features.walletconnect.impl.R internal class PreviewFeeSelectorBlockComponent : FeeSelectorBlockComponent { diff --git a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/components/common/WcNavigationUtils.kt b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/components/common/WcNavigationUtils.kt index d4686d0460..fcb776bd14 100644 --- a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/components/common/WcNavigationUtils.kt +++ b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/components/common/WcNavigationUtils.kt @@ -3,10 +3,10 @@ package com.tangem.features.walletconnect.transaction.components.common import com.tangem.core.decompose.context.AppComponentContext import com.tangem.core.ui.decompose.ComposableBottomSheetComponent import com.tangem.domain.walletconnect.WcAnalyticEvents -import com.tangem.features.send.v2.api.FeeSelectorComponent -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents -import com.tangem.features.send.v2.api.params.FeeSelectorParams.FeeDisplaySource -import com.tangem.features.send.v2.api.params.FeeSelectorParams.FeeSelectorDetailsParams +import com.tangem.features.send.api.FeeSelectorComponent +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents +import com.tangem.features.send.api.params.FeeSelectorParams.FeeDisplaySource +import com.tangem.features.send.api.params.FeeSelectorParams.FeeSelectorDetailsParams import com.tangem.features.walletconnect.connections.components.AlertsComponentV2 import com.tangem.features.walletconnect.connections.utils.WcAlertsFactory.createCommonTransactionAppInfoAlertUM import com.tangem.features.walletconnect.transaction.components.send.WcCustomAllowanceComponent diff --git a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/components/send/WcSendTransactionComponent.kt b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/components/send/WcSendTransactionComponent.kt index cf234d50b6..9173c11909 100644 --- a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/components/send/WcSendTransactionComponent.kt +++ b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/components/send/WcSendTransactionComponent.kt @@ -7,10 +7,10 @@ import com.arkivanov.essenty.lifecycle.doOnResume import com.tangem.core.decompose.context.AppComponentContext import com.tangem.core.ui.decompose.ComposableBottomSheetComponent import com.tangem.domain.walletconnect.WcAnalyticEvents -import com.tangem.features.send.v2.api.FeeSelectorBlockComponent -import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents -import com.tangem.features.send.v2.api.entity.FeeSelectorUM -import com.tangem.features.send.v2.api.params.FeeSelectorParams +import com.tangem.features.send.api.FeeSelectorBlockComponent +import com.tangem.features.send.api.analytics.CommonSendAnalyticEvents +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.api.params.FeeSelectorParams import com.tangem.features.walletconnect.transaction.entity.common.WcTransactionFeeState import com.tangem.features.walletconnect.transaction.model.WcSendTransactionModel import com.tangem.features.walletconnect.transaction.ui.send.WcSendTransactionModalBottomSheet diff --git a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/components/send/WcSendTransactionContainerComponent.kt b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/components/send/WcSendTransactionContainerComponent.kt index 3b232b8df1..f7b4cc1549 100644 --- a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/components/send/WcSendTransactionContainerComponent.kt +++ b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/components/send/WcSendTransactionContainerComponent.kt @@ -5,8 +5,8 @@ import com.tangem.core.decompose.context.AppComponentContext import com.tangem.core.decompose.context.childByContext import com.tangem.core.decompose.model.getOrCreateModel import com.tangem.core.ui.decompose.ComposableBottomSheetComponent -import com.tangem.features.send.v2.api.FeeSelectorBlockComponent -import com.tangem.features.send.v2.api.FeeSelectorComponent +import com.tangem.features.send.api.FeeSelectorBlockComponent +import com.tangem.features.send.api.FeeSelectorComponent import com.tangem.features.walletconnect.transaction.components.common.WcCommonTransactionComponentDelegate import com.tangem.features.walletconnect.transaction.components.common.WcTransactionModelParams import com.tangem.features.walletconnect.transaction.components.common.getWcCommonScreen diff --git a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/converter/WcSendTransactionUMConverter.kt b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/converter/WcSendTransactionUMConverter.kt index b51f19d1bd..b4f72c25b2 100644 --- a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/converter/WcSendTransactionUMConverter.kt +++ b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/converter/WcSendTransactionUMConverter.kt @@ -11,7 +11,7 @@ import com.tangem.domain.walletconnect.usecase.method.BlockAidTransactionCheck import com.tangem.domain.walletconnect.usecase.method.WcMethodContext import com.tangem.domain.walletconnect.usecase.method.WcSignState import com.tangem.domain.walletconnect.usecase.method.WcSignStep -import com.tangem.features.send.v2.api.entity.FeeSelectorUM +import com.tangem.features.send.api.entity.FeeSelectorUM import com.tangem.features.walletconnect.transaction.entity.blockaid.WcSendReceiveTransactionCheckResultsUM import com.tangem.features.walletconnect.transaction.entity.common.WcTransactionActionsUM import com.tangem.features.walletconnect.transaction.entity.common.WcTransactionFeeState diff --git a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/entity/send/WcSendTransactionUM.kt b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/entity/send/WcSendTransactionUM.kt index 61a43bb901..63194291e0 100644 --- a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/entity/send/WcSendTransactionUM.kt +++ b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/entity/send/WcSendTransactionUM.kt @@ -4,7 +4,7 @@ import com.domain.blockaid.models.transaction.ValidationResult import com.tangem.common.ui.account.AccountTitleUM import com.tangem.common.ui.notifications.NotificationUM import com.tangem.core.ui.components.bottomsheets.TangemBottomSheetConfigContent -import com.tangem.features.send.v2.api.entity.FeeSelectorUM +import com.tangem.features.send.api.entity.FeeSelectorUM import com.tangem.features.walletconnect.transaction.entity.approve.WcSpendAllowanceUM import com.tangem.features.walletconnect.transaction.entity.blockaid.WcSendReceiveTransactionCheckResultsUM import com.tangem.features.walletconnect.transaction.entity.common.WcCommonTransactionUM diff --git a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/model/WcSendTransactionModel.kt b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/model/WcSendTransactionModel.kt index 85ce399ac9..171810fbb8 100644 --- a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/model/WcSendTransactionModel.kt +++ b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/model/WcSendTransactionModel.kt @@ -41,11 +41,11 @@ import com.tangem.domain.walletconnect.WcRequestUseCaseFactory import com.tangem.domain.walletconnect.model.WcRequestError import com.tangem.domain.walletconnect.model.WcRequestError.Companion.message import com.tangem.domain.walletconnect.usecase.method.* -import com.tangem.features.send.v2.api.callbacks.FeeSelectorModelCallback -import com.tangem.features.send.v2.api.entity.FeeSelectorUM -import com.tangem.features.send.v2.api.params.FeeSelectorParams.FeeStateConfiguration -import com.tangem.features.send.v2.api.subcomponents.feeSelector.FeeSelectorReloadTrigger -import com.tangem.features.send.v2.api.subcomponents.feeSelector.entity.FeeSelectorData +import com.tangem.features.send.api.callbacks.FeeSelectorModelCallback +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.api.params.FeeSelectorParams.FeeStateConfiguration +import com.tangem.features.send.api.subcomponents.feeSelector.FeeSelectorReloadTrigger +import com.tangem.features.send.api.subcomponents.feeSelector.entity.FeeSelectorData import com.tangem.features.walletconnect.connections.routing.WcInnerRoute import com.tangem.features.walletconnect.impl.R import com.tangem.features.walletconnect.transaction.components.common.WcTransactionModelParams diff --git a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/ui/common/WcSendTransactionItems.kt b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/ui/common/WcSendTransactionItems.kt index a8bc3dff7f..6a74692291 100644 --- a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/ui/common/WcSendTransactionItems.kt +++ b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/ui/common/WcSendTransactionItems.kt @@ -15,8 +15,8 @@ import com.tangem.common.ui.account.AccountTitleUM import com.tangem.core.ui.components.divider.DividerWithPadding import com.tangem.core.ui.extensions.clickableSingle import com.tangem.core.ui.res.TangemTheme -import com.tangem.features.send.v2.api.FeeSelectorBlockComponent -import com.tangem.features.send.v2.api.entity.FeeSelectorUM +import com.tangem.features.send.api.FeeSelectorBlockComponent +import com.tangem.features.send.api.entity.FeeSelectorUM import com.tangem.features.walletconnect.transaction.entity.common.WcNetworkInfoUM import com.tangem.features.walletconnect.transaction.entity.common.WcTransactionFeeState diff --git a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/ui/send/WcSendTransactionModalBottomSheet.kt b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/ui/send/WcSendTransactionModalBottomSheet.kt index 76d2c41365..6f7f7fbff3 100644 --- a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/ui/send/WcSendTransactionModalBottomSheet.kt +++ b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/ui/send/WcSendTransactionModalBottomSheet.kt @@ -31,8 +31,8 @@ import com.tangem.core.ui.extensions.resourceReference import com.tangem.core.ui.extensions.stringReference import com.tangem.core.ui.res.TangemTheme import com.tangem.core.ui.res.TangemThemePreview -import com.tangem.features.send.v2.api.FeeSelectorBlockComponent -import com.tangem.features.send.v2.api.entity.FeeSelectorUM +import com.tangem.features.send.api.FeeSelectorBlockComponent +import com.tangem.features.send.api.entity.FeeSelectorUM import com.tangem.features.walletconnect.connections.entity.VerifiedDAppState import com.tangem.features.walletconnect.connections.ui.WcAppInfoItem import com.tangem.features.walletconnect.impl.R diff --git a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/utils/WcNotificationsFactory.kt b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/utils/WcNotificationsFactory.kt index 09b3659efd..1726479f92 100644 --- a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/utils/WcNotificationsFactory.kt +++ b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/utils/WcNotificationsFactory.kt @@ -5,8 +5,8 @@ import com.tangem.core.ui.components.notifications.NotificationConfig import com.tangem.core.ui.extensions.resourceReference import com.tangem.core.ui.extensions.wrappedList import com.tangem.domain.models.currency.CryptoCurrencyStatus -import com.tangem.features.send.v2.api.entity.FeeSelectorUM -import com.tangem.features.send.v2.api.subcomponents.feeSelector.utils.FeeCalculationUtils +import com.tangem.features.send.api.entity.FeeSelectorUM +import com.tangem.features.send.api.subcomponents.feeSelector.utils.FeeCalculationUtils import com.tangem.features.walletconnect.impl.R import javax.inject.Inject diff --git a/settings.gradle.kts b/settings.gradle.kts index 1e394ee095..9444a8388c 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -220,8 +220,8 @@ include(":features:wallet:impl") include(":features:tokendetails:api") include(":features:tokendetails:impl") -include(":features:send-v2:api") -include(":features:send-v2:impl") +include(":features:send:api") +include(":features:send:impl") include(":features:manage-tokens:api") include(":features:manage-tokens:impl")