diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 1188d0e283..048e2f771d 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -274,6 +274,8 @@ dependencies { implementation(projects.features.tangempay.onboarding.impl) implementation(projects.features.tokenRecieve.api) implementation(projects.features.tokenRecieve.impl) + implementation(projects.features.yieldSupply.api) + implementation(projects.features.yieldSupply.api) /** AndroidX libraries */ implementation(deps.androidx.core.ktx) diff --git a/core/config-toggles/src/main/assets/configs/feature_toggles_config.json b/core/config-toggles/src/main/assets/configs/feature_toggles_config.json index b22c123693..6a91513972 100644 --- a/core/config-toggles/src/main/assets/configs/feature_toggles_config.json +++ b/core/config-toggles/src/main/assets/configs/feature_toggles_config.json @@ -52,7 +52,7 @@ "version": "5.28.0" }, { - "name": "YIELD_LENDING_FEATURE_ENABLED", + "name": "YIELD_SUPPLY_FEATURE_ENABLED", "version": "undefined" }, { diff --git a/features/yield-lending/api/src/main/java/com/tangem/features/yieldlending/api/YieldLendingFeatureToggles.kt b/features/yield-lending/api/src/main/java/com/tangem/features/yieldlending/api/YieldLendingFeatureToggles.kt deleted file mode 100644 index 3d1c8a10bd..0000000000 --- a/features/yield-lending/api/src/main/java/com/tangem/features/yieldlending/api/YieldLendingFeatureToggles.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.tangem.features.yieldlending.api - -interface YieldLendingFeatureToggles { - - val isYieldLendingFeatureEnabled: Boolean -} \ No newline at end of file diff --git a/features/yield-lending/impl/src/main/java/com/tangem/features/yieldlending/impl/DefaultYieldLendingFeatureToggles.kt b/features/yield-lending/impl/src/main/java/com/tangem/features/yieldlending/impl/DefaultYieldLendingFeatureToggles.kt deleted file mode 100644 index 4e780b4e96..0000000000 --- a/features/yield-lending/impl/src/main/java/com/tangem/features/yieldlending/impl/DefaultYieldLendingFeatureToggles.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.tangem.features.yieldlending.impl - -import com.tangem.core.configtoggle.feature.FeatureTogglesManager -import com.tangem.features.yieldlending.api.YieldLendingFeatureToggles - -internal class DefaultYieldLendingFeatureToggles( - private val featureToggles: FeatureTogglesManager, -) : YieldLendingFeatureToggles { - override val isYieldLendingFeatureEnabled: Boolean - get() = featureToggles.isFeatureEnabled("YIELD_LENDING_FEATURE_ENABLED") -} \ No newline at end of file diff --git a/features/yield-lending/api/.gitignore b/features/yield-supply/api/.gitignore similarity index 100% rename from features/yield-lending/api/.gitignore rename to features/yield-supply/api/.gitignore diff --git a/features/yield-lending/api/build.gradle.kts b/features/yield-supply/api/build.gradle.kts similarity index 90% rename from features/yield-lending/api/build.gradle.kts rename to features/yield-supply/api/build.gradle.kts index da7d806bb3..7fbd6e9fd1 100644 --- a/features/yield-lending/api/build.gradle.kts +++ b/features/yield-supply/api/build.gradle.kts @@ -5,7 +5,7 @@ plugins { } android { - namespace = "com.tangem.features.yieldlending.api" + namespace = "com.tangem.features.yield.supply.api" } dependencies { diff --git a/features/yield-supply/api/src/main/java/com/tangem/features/yield/supply/api/YieldSupplyFeatureToggles.kt b/features/yield-supply/api/src/main/java/com/tangem/features/yield/supply/api/YieldSupplyFeatureToggles.kt new file mode 100644 index 0000000000..93edb89872 --- /dev/null +++ b/features/yield-supply/api/src/main/java/com/tangem/features/yield/supply/api/YieldSupplyFeatureToggles.kt @@ -0,0 +1,6 @@ +package com.tangem.features.yield.supply.api + +interface YieldSupplyFeatureToggles { + + val isYieldSupplyFeatureEnabled: Boolean +} \ No newline at end of file diff --git a/features/yield-lending/impl/.gitignore b/features/yield-supply/impl/.gitignore similarity index 100% rename from features/yield-lending/impl/.gitignore rename to features/yield-supply/impl/.gitignore diff --git a/features/yield-lending/impl/build.gradle.kts b/features/yield-supply/impl/build.gradle.kts similarity index 55% rename from features/yield-lending/impl/build.gradle.kts rename to features/yield-supply/impl/build.gradle.kts index 40ebde87d3..14dbb06d31 100644 --- a/features/yield-lending/impl/build.gradle.kts +++ b/features/yield-supply/impl/build.gradle.kts @@ -8,24 +8,39 @@ plugins { } android { - namespace = "com.tangem.features.yieldlending.impl" + namespace = "com.tangem.features.yield.supply.impl" } dependencies { /** Feature */ - implementation(projects.features.yieldLending.api) + implementation(projects.features.yieldSupply.api) + implementation(projects.features.sendV2.api) /** Core */ implementation(projects.core.configToggles) implementation(projects.core.decompose) implementation(projects.core.ui) + /** Common */ + implementation(projects.common.ui) + implementation(projects.common.routing) + + /** SDK */ + implementation(tangemDeps.blockchain) { + exclude(module = "joda-time") + } + /** Domain */ implementation(projects.domain.models) - implementation(projects.domain.wallets.models) - implementation(projects.domain.tokens.models) implementation(projects.domain.appCurrency.models) + implementation(projects.domain.appCurrency) + implementation(projects.domain.wallets.models) + implementation(projects.domain.wallets) + implementation(projects.domain.tokens.models) + implementation(projects.domain.tokens) + implementation(projects.domain.transaction.models) + implementation(projects.domain.transaction) /** Compose */ implementation(deps.compose.foundation) @@ -35,6 +50,12 @@ dependencies { implementation(deps.compose.ui.tooling) implementation(deps.androidx.activity.compose) + /** Other */ + implementation(deps.decompose) + implementation(deps.decompose.ext.compose) + implementation(deps.timber) + implementation(deps.kotlin.immutable.collections) + /** DI */ implementation(deps.hilt.android) kapt(deps.hilt.kapt) diff --git a/features/yield-supply/impl/src/main/java/com/tangem/features/yield/supply/impl/DefaultYieldSupplyFeatureToggles.kt b/features/yield-supply/impl/src/main/java/com/tangem/features/yield/supply/impl/DefaultYieldSupplyFeatureToggles.kt new file mode 100644 index 0000000000..db476c617b --- /dev/null +++ b/features/yield-supply/impl/src/main/java/com/tangem/features/yield/supply/impl/DefaultYieldSupplyFeatureToggles.kt @@ -0,0 +1,11 @@ +package com.tangem.features.yield.supply.impl + +import com.tangem.core.configtoggle.feature.FeatureTogglesManager +import com.tangem.features.yield.supply.api.YieldSupplyFeatureToggles + +internal class DefaultYieldSupplyFeatureToggles( + private val featureToggles: FeatureTogglesManager, +) : YieldSupplyFeatureToggles { + override val isYieldSupplyFeatureEnabled: Boolean + get() = featureToggles.isFeatureEnabled("YIELD_SUPPLY_FEATURE_ENABLED") +} \ No newline at end of file diff --git a/features/yield-lending/impl/src/main/java/com/tangem/features/yieldlending/impl/di/YieldLendingFeatureModule.kt b/features/yield-supply/impl/src/main/java/com/tangem/features/yield/supply/impl/di/YieldSupplyFeatureModule.kt similarity index 50% rename from features/yield-lending/impl/src/main/java/com/tangem/features/yieldlending/impl/di/YieldLendingFeatureModule.kt rename to features/yield-supply/impl/src/main/java/com/tangem/features/yield/supply/impl/di/YieldSupplyFeatureModule.kt index d666cb36a1..45b8806bd6 100644 --- a/features/yield-lending/impl/src/main/java/com/tangem/features/yieldlending/impl/di/YieldLendingFeatureModule.kt +++ b/features/yield-supply/impl/src/main/java/com/tangem/features/yield/supply/impl/di/YieldSupplyFeatureModule.kt @@ -1,8 +1,8 @@ -package com.tangem.features.yieldlending.impl.di +package com.tangem.features.yield.supply.impl.di import com.tangem.core.configtoggle.feature.FeatureTogglesManager -import com.tangem.features.yieldlending.api.YieldLendingFeatureToggles -import com.tangem.features.yieldlending.impl.DefaultYieldLendingFeatureToggles +import com.tangem.features.yield.supply.impl.DefaultYieldSupplyFeatureToggles +import com.tangem.features.yield.supply.api.YieldSupplyFeatureToggles import dagger.Module import dagger.Provides import dagger.hilt.InstallIn @@ -11,11 +11,11 @@ import javax.inject.Singleton @InstallIn(SingletonComponent::class) @Module -internal object YieldLendingFeatureModule { +internal object YieldSupplyFeatureModule { @Singleton @Provides - fun provideYieldFeatureToggles(featureTogglesManager: FeatureTogglesManager): YieldLendingFeatureToggles { - return DefaultYieldLendingFeatureToggles(featureTogglesManager) + fun provideYieldFeatureToggles(featureTogglesManager: FeatureTogglesManager): YieldSupplyFeatureToggles { + return DefaultYieldSupplyFeatureToggles(featureTogglesManager) } } \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index 99aee86df3..c70d2637a1 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -287,8 +287,8 @@ include(":features:account:impl") include(":features:token-recieve:api") include(":features:token-recieve:impl") -include(":features:yield-lending:api") -include(":features:yield-lending:impl") +include(":features:yield-supply:api") +include(":features:yield-supply:impl") // endregion Feature modules // region Domain modules