Updated on 2026-08-14
This commit is contained in:
parent
c5211efa73
commit
7f81a2912e
9 changed files with 158 additions and 1 deletions
|
|
@ -62,5 +62,13 @@
|
||||||
{
|
{
|
||||||
"name": "USEDESK_ENABLED",
|
"name": "USEDESK_ENABLED",
|
||||||
"version": "undefined"
|
"version": "undefined"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "SEND_VIA_SWAP_ENABLED",
|
||||||
|
"version": "undefined"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "SWAP_REDESIGN_ENABLED",
|
||||||
|
"version": "undefined"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
1
features/swap-v2/api/.gitignore
vendored
Normal file
1
features/swap-v2/api/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
/build
|
||||||
25
features/swap-v2/api/build.gradle.kts
Normal file
25
features/swap-v2/api/build.gradle.kts
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
plugins {
|
||||||
|
alias(deps.plugins.android.library)
|
||||||
|
alias(deps.plugins.kotlin.android)
|
||||||
|
id("configuration")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace = "com.tangem.features.swap.v2.api"
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
/** Core */
|
||||||
|
implementation(projects.core.decompose)
|
||||||
|
implementation(projects.core.ui)
|
||||||
|
|
||||||
|
/** Domain */
|
||||||
|
implementation(projects.domain.wallets.models)
|
||||||
|
implementation(projects.domain.express.models)
|
||||||
|
implementation(projects.domain.swap.models)
|
||||||
|
implementation(projects.domain.manageTokens.models)
|
||||||
|
implementation(projects.domain.models)
|
||||||
|
|
||||||
|
/** Compose */
|
||||||
|
implementation(deps.compose.runtime)
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
package com.tangem.features.swap.v2.api
|
||||||
|
|
||||||
|
interface SwapFeatureToggles {
|
||||||
|
val isSwapRedesignEnabled: Boolean
|
||||||
|
}
|
||||||
1
features/swap-v2/impl/.gitignore
vendored
Normal file
1
features/swap-v2/impl/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
/build
|
||||||
79
features/swap-v2/impl/build.gradle.kts
Normal file
79
features/swap-v2/impl/build.gradle.kts
Normal file
|
|
@ -0,0 +1,79 @@
|
||||||
|
plugins {
|
||||||
|
alias(deps.plugins.android.library)
|
||||||
|
alias(deps.plugins.kotlin.android)
|
||||||
|
alias(deps.plugins.kotlin.kapt)
|
||||||
|
alias(deps.plugins.kotlin.serialization)
|
||||||
|
alias(deps.plugins.hilt.android)
|
||||||
|
id("configuration")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace = "com.tangem.features.swap.v2.impl"
|
||||||
|
packaging {
|
||||||
|
resources {
|
||||||
|
// To build and run composable preview
|
||||||
|
merges += "paymentrequest.proto"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
/** Feature */
|
||||||
|
implementation(projects.features.swapV2.api)
|
||||||
|
implementation(projects.features.manageTokens.api)
|
||||||
|
implementation(projects.features.sendV2.api)
|
||||||
|
implementation(projects.features.feeSelector.api)
|
||||||
|
|
||||||
|
/** Core */
|
||||||
|
implementation(projects.core.decompose)
|
||||||
|
implementation(projects.core.ui)
|
||||||
|
implementation(projects.core.navigation)
|
||||||
|
implementation(projects.core.configToggles)
|
||||||
|
|
||||||
|
/** Common */
|
||||||
|
implementation(projects.common.ui)
|
||||||
|
implementation(projects.common.routing)
|
||||||
|
|
||||||
|
implementation(tangemDeps.blockchain) {
|
||||||
|
exclude(module = "joda-time")
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Domain */
|
||||||
|
implementation(projects.domain.models)
|
||||||
|
implementation(projects.domain.wallets.models)
|
||||||
|
implementation(projects.domain.wallets)
|
||||||
|
implementation(projects.domain.tokens.models)
|
||||||
|
implementation(projects.domain.tokens)
|
||||||
|
implementation(projects.domain.appCurrency.models)
|
||||||
|
implementation(projects.domain.appCurrency)
|
||||||
|
implementation(projects.domain.express.models)
|
||||||
|
implementation(projects.domain.swap.models)
|
||||||
|
implementation(projects.domain.swap)
|
||||||
|
implementation(projects.domain.manageTokens.models)
|
||||||
|
implementation(projects.domain.manageTokens)
|
||||||
|
implementation(projects.domain.transaction.models)
|
||||||
|
implementation(projects.domain.transaction)
|
||||||
|
|
||||||
|
/** Compose */
|
||||||
|
implementation(deps.compose.foundation)
|
||||||
|
implementation(deps.compose.runtime)
|
||||||
|
implementation(deps.compose.material3)
|
||||||
|
implementation(deps.compose.ui)
|
||||||
|
implementation(deps.compose.ui.tooling)
|
||||||
|
implementation(deps.androidx.activity.compose)
|
||||||
|
implementation(deps.compose.constraintLayout)
|
||||||
|
implementation(deps.compose.coil)
|
||||||
|
|
||||||
|
/** Other */
|
||||||
|
implementation(deps.arrow.core)
|
||||||
|
implementation(deps.decompose)
|
||||||
|
implementation(deps.decompose.ext.compose)
|
||||||
|
implementation(deps.timber)
|
||||||
|
implementation(deps.kotlin.immutable.collections)
|
||||||
|
implementation(deps.coil)
|
||||||
|
|
||||||
|
/** DI */
|
||||||
|
implementation(deps.hilt.android)
|
||||||
|
kapt(deps.hilt.kapt)
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
package com.tangem.features.swap.v2.impl
|
||||||
|
|
||||||
|
import com.tangem.core.configtoggle.feature.FeatureTogglesManager
|
||||||
|
import com.tangem.features.swap.v2.api.SwapFeatureToggles
|
||||||
|
|
||||||
|
internal class DefaultSwapFeatureToggles(
|
||||||
|
private val featureToggles: FeatureTogglesManager,
|
||||||
|
) : SwapFeatureToggles {
|
||||||
|
override val isSwapRedesignEnabled: Boolean
|
||||||
|
get() = featureToggles.isFeatureEnabled("SWAP_REDESIGN_ENABLED")
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
package com.tangem.features.swap.v2.impl.di
|
||||||
|
|
||||||
|
import com.tangem.core.configtoggle.feature.FeatureTogglesManager
|
||||||
|
import com.tangem.features.swap.v2.api.SwapFeatureToggles
|
||||||
|
import com.tangem.features.swap.v2.impl.DefaultSwapFeatureToggles
|
||||||
|
import dagger.Module
|
||||||
|
import dagger.Provides
|
||||||
|
import dagger.hilt.InstallIn
|
||||||
|
import dagger.hilt.components.SingletonComponent
|
||||||
|
import javax.inject.Singleton
|
||||||
|
|
||||||
|
@Module
|
||||||
|
@InstallIn(SingletonComponent::class)
|
||||||
|
internal object SwapFeatureModules {
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
@Singleton
|
||||||
|
fun provideSwapFeatureToggles(featureTogglesManager: FeatureTogglesManager): SwapFeatureToggles {
|
||||||
|
return DefaultSwapFeatureToggles(featureTogglesManager)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -301,6 +301,10 @@ include(":domain:blockaid:models")
|
||||||
include(":domain:notifications")
|
include(":domain:notifications")
|
||||||
include(":domain:notifications:models")
|
include(":domain:notifications:models")
|
||||||
include(":domain:notifications:toggles")
|
include(":domain:notifications:toggles")
|
||||||
|
include(":domain:express")
|
||||||
|
include(":domain:express:models")
|
||||||
|
include(":domain:swap")
|
||||||
|
include(":domain:swap:models")
|
||||||
// endregion Domain modules
|
// endregion Domain modules
|
||||||
|
|
||||||
// region Data modules
|
// region Data modules
|
||||||
|
|
@ -330,4 +334,6 @@ include(":data:onramp")
|
||||||
include(":data:quotes")
|
include(":data:quotes")
|
||||||
include(":data:notifications")
|
include(":data:notifications")
|
||||||
include(":data:blockaid")
|
include(":data:blockaid")
|
||||||
// endregion Data modules
|
// endregion Data modules
|
||||||
|
include(":data:swap")
|
||||||
|
include(":data:express")
|
||||||
Loading…
Add table
Add a link
Reference in a new issue