Updated on 2026-08-14
This commit is contained in:
parent
71a9252de8
commit
96a748c904
18 changed files with 83 additions and 56 deletions
|
|
@ -1,8 +1,6 @@
|
|||
package com.tangem.features.onramp.di
|
||||
package com.tangem.features.onramp
|
||||
|
||||
import com.tangem.core.featuretoggle.manager.FeatureTogglesManager
|
||||
import com.tangem.features.onramp.DefaultOnrampFeatureToggles
|
||||
import com.tangem.features.onramp.OnrampFeatureToggles
|
||||
import dagger.Module
|
||||
import dagger.Provides
|
||||
import dagger.hilt.InstallIn
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.tangem.features.onramp.component
|
||||
package com.tangem.features.onramp.confirmresidency
|
||||
|
||||
import com.tangem.core.decompose.factory.ComponentFactory
|
||||
import com.tangem.core.ui.decompose.ComposableBottomSheetComponent
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.tangem.features.onramp.component.impl
|
||||
package com.tangem.features.onramp.confirmresidency
|
||||
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.getValue
|
||||
|
|
@ -14,12 +14,11 @@ import com.tangem.core.decompose.model.getOrCreateModel
|
|||
import com.tangem.core.ui.components.bottomsheets.TangemBottomSheetConfig
|
||||
import com.tangem.core.ui.components.bottomsheets.TangemBottomSheetConfigContent
|
||||
import com.tangem.core.ui.decompose.ComposableBottomSheetComponent
|
||||
import com.tangem.features.onramp.component.ConfirmResidencyComponent
|
||||
import com.tangem.features.onramp.model.ConfirmResidencyModel
|
||||
import com.tangem.features.onramp.confirmresidency.model.ConfirmResidencyModel
|
||||
import com.tangem.features.onramp.selectcountry.SelectCountryComponent
|
||||
import com.tangem.features.onramp.selectcountry.entity.ConfirmResidencyBottomSheetConfig
|
||||
import com.tangem.features.onramp.ui.ConfirmResidencyBottomSheet
|
||||
import com.tangem.features.onramp.ui.ConfirmResidencyBottomSheetContent
|
||||
import com.tangem.features.onramp.confirmresidency.ui.ConfirmResidencyBottomSheet
|
||||
import com.tangem.features.onramp.confirmresidency.ui.ConfirmResidencyBottomSheetContent
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
import dagger.assisted.AssistedInject
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.tangem.features.onramp.component.preview
|
||||
package com.tangem.features.onramp.confirmresidency
|
||||
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.getValue
|
||||
|
|
@ -7,10 +7,9 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
|||
import com.tangem.core.ui.components.bottomsheets.TangemBottomSheetConfig
|
||||
import com.tangem.core.ui.components.bottomsheets.TangemBottomSheetConfigContent
|
||||
import com.tangem.core.ui.extensions.stringReference
|
||||
import com.tangem.features.onramp.component.ConfirmResidencyComponent
|
||||
import com.tangem.features.onramp.entity.ConfirmResidencyUM
|
||||
import com.tangem.features.onramp.ui.ConfirmResidencyBottomSheet
|
||||
import com.tangem.features.onramp.ui.ConfirmResidencyBottomSheetContent
|
||||
import com.tangem.features.onramp.confirmresidency.entity.ConfirmResidencyUM
|
||||
import com.tangem.features.onramp.confirmresidency.ui.ConfirmResidencyBottomSheet
|
||||
import com.tangem.features.onramp.confirmresidency.ui.ConfirmResidencyBottomSheetContent
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
|
||||
internal class PreviewConfirmResidencyComponent(
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package com.tangem.features.onramp.confirmresidency.di
|
||||
|
||||
import com.tangem.features.onramp.confirmresidency.ConfirmResidencyComponent
|
||||
import com.tangem.features.onramp.confirmresidency.DefaultConfirmResidencyComponent
|
||||
import dagger.Binds
|
||||
import dagger.Module
|
||||
import dagger.hilt.InstallIn
|
||||
import dagger.hilt.components.SingletonComponent
|
||||
import javax.inject.Singleton
|
||||
|
||||
@Module
|
||||
@InstallIn(SingletonComponent::class)
|
||||
internal interface OnrampConfirmResidencyComponentModule {
|
||||
|
||||
@Binds
|
||||
@Singleton
|
||||
fun bindConfirmResidencyComponentFactory(
|
||||
factory: DefaultConfirmResidencyComponent.Factory,
|
||||
): ConfirmResidencyComponent.Factory
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.tangem.features.onramp.confirmresidency.di
|
||||
|
||||
import com.tangem.core.decompose.di.DecomposeComponent
|
||||
import com.tangem.core.decompose.model.Model
|
||||
import com.tangem.features.onramp.confirmresidency.model.ConfirmResidencyModel
|
||||
import dagger.Binds
|
||||
import dagger.Module
|
||||
import dagger.hilt.InstallIn
|
||||
import dagger.multibindings.ClassKey
|
||||
import dagger.multibindings.IntoMap
|
||||
|
||||
@Module
|
||||
@InstallIn(DecomposeComponent::class)
|
||||
internal interface OnrampConfirmResidencyModelModule {
|
||||
@Binds
|
||||
@IntoMap
|
||||
@ClassKey(ConfirmResidencyModel::class)
|
||||
fun bindConfirmResidencyModel(model: ConfirmResidencyModel): Model
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.tangem.features.onramp.entity
|
||||
package com.tangem.features.onramp.confirmresidency.entity
|
||||
|
||||
import com.tangem.core.ui.extensions.TextReference
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.tangem.features.onramp.model
|
||||
package com.tangem.features.onramp.confirmresidency.model
|
||||
|
||||
import com.arkivanov.decompose.router.slot.SlotNavigation
|
||||
import com.arkivanov.decompose.router.slot.activate
|
||||
|
|
@ -6,8 +6,8 @@ import com.tangem.core.decompose.di.ComponentScoped
|
|||
import com.tangem.core.decompose.model.Model
|
||||
import com.tangem.core.decompose.model.ParamsContainer
|
||||
import com.tangem.core.ui.extensions.resourceReference
|
||||
import com.tangem.features.onramp.component.ConfirmResidencyComponent
|
||||
import com.tangem.features.onramp.entity.ConfirmResidencyUM
|
||||
import com.tangem.features.onramp.confirmresidency.ConfirmResidencyComponent
|
||||
import com.tangem.features.onramp.confirmresidency.entity.ConfirmResidencyUM
|
||||
import com.tangem.features.onramp.impl.R
|
||||
import com.tangem.features.onramp.selectcountry.entity.ConfirmResidencyBottomSheetConfig
|
||||
import com.tangem.utils.coroutines.CoroutineDispatcherProvider
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.tangem.features.onramp.ui
|
||||
package com.tangem.features.onramp.confirmresidency.ui
|
||||
|
||||
import android.content.res.Configuration
|
||||
import androidx.compose.foundation.layout.*
|
||||
|
|
@ -27,9 +27,9 @@ 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.onramp.component.ConfirmResidencyComponent
|
||||
import com.tangem.features.onramp.component.preview.PreviewConfirmResidencyComponent
|
||||
import com.tangem.features.onramp.entity.ConfirmResidencyUM
|
||||
import com.tangem.features.onramp.confirmresidency.ConfirmResidencyComponent
|
||||
import com.tangem.features.onramp.confirmresidency.PreviewConfirmResidencyComponent
|
||||
import com.tangem.features.onramp.confirmresidency.entity.ConfirmResidencyUM
|
||||
import com.tangem.features.onramp.impl.R
|
||||
|
||||
@Composable
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
package com.tangem.features.onramp.di
|
||||
|
||||
import com.tangem.features.onramp.component.ConfirmResidencyComponent
|
||||
import com.tangem.features.onramp.component.OnrampComponent
|
||||
import com.tangem.features.onramp.component.impl.DefaultConfirmResidencyComponent
|
||||
import com.tangem.features.onramp.component.impl.DefaultOnrampComponent
|
||||
import dagger.Binds
|
||||
import dagger.Module
|
||||
import dagger.hilt.InstallIn
|
||||
import dagger.hilt.components.SingletonComponent
|
||||
import javax.inject.Singleton
|
||||
|
||||
@Module
|
||||
@InstallIn(SingletonComponent::class)
|
||||
internal interface OnrampComponentModule {
|
||||
|
||||
@Binds
|
||||
@Singleton
|
||||
fun bindOnrampComponentFactory(factory: DefaultOnrampComponent.Factory): OnrampComponent.Factory
|
||||
|
||||
@Binds
|
||||
@Singleton
|
||||
fun bindConfirmResidencyComponentFactory(
|
||||
factory: DefaultConfirmResidencyComponent.Factory,
|
||||
): ConfirmResidencyComponent.Factory
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.tangem.features.onramp.component.impl
|
||||
package com.tangem.features.onramp.root
|
||||
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.getValue
|
||||
|
|
@ -13,7 +13,7 @@ import com.tangem.core.decompose.context.AppComponentContext
|
|||
import com.tangem.core.decompose.context.childByContext
|
||||
import com.tangem.core.ui.decompose.ComposableContentComponent
|
||||
import com.tangem.features.onramp.component.OnrampComponent
|
||||
import com.tangem.features.onramp.entity.OnrampChild
|
||||
import com.tangem.features.onramp.root.entity.OnrampChild
|
||||
import com.tangem.features.onramp.settings.OnrampSettingsComponent
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.tangem.features.onramp.root.di
|
||||
|
||||
import com.tangem.features.onramp.component.OnrampComponent
|
||||
import com.tangem.features.onramp.root.DefaultOnrampComponent
|
||||
import dagger.Binds
|
||||
import dagger.Module
|
||||
import dagger.hilt.InstallIn
|
||||
import dagger.hilt.components.SingletonComponent
|
||||
import javax.inject.Singleton
|
||||
|
||||
@Module
|
||||
@InstallIn(SingletonComponent::class)
|
||||
internal interface OnrampComponentModule {
|
||||
|
||||
@Binds
|
||||
@Singleton
|
||||
fun bindOnrampComponentFactory(factory: DefaultOnrampComponent.Factory): OnrampComponent.Factory
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.tangem.features.onramp.entity
|
||||
package com.tangem.features.onramp.root.entity
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
|
|
@ -11,7 +11,7 @@ import com.tangem.domain.redux.ReduxStateHolder
|
|||
import com.tangem.domain.tokens.legacy.TradeCryptoAction
|
||||
import com.tangem.domain.tokens.model.CryptoCurrencyStatus
|
||||
import com.tangem.domain.wallets.usecase.GetWalletsUseCase
|
||||
import com.tangem.features.onramp.entity.OnrampOperation
|
||||
import com.tangem.features.onramp.tokenlist.entity.OnrampOperation
|
||||
import com.tangem.features.onramp.impl.R
|
||||
import com.tangem.features.onramp.selecttoken.ui.OnrampSelectToken
|
||||
import com.tangem.features.onramp.tokenlist.OnrampTokenListComponent
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import com.tangem.core.decompose.context.AppComponentContext
|
|||
import com.tangem.core.decompose.context.child
|
||||
import com.tangem.core.decompose.model.getOrCreateModel
|
||||
import com.tangem.features.onramp.component.SwapSelectTokensComponent
|
||||
import com.tangem.features.onramp.entity.OnrampOperation
|
||||
import com.tangem.features.onramp.tokenlist.entity.OnrampOperation
|
||||
import com.tangem.features.onramp.swap.model.SwapSelectTokensModel
|
||||
import com.tangem.features.onramp.swap.ui.SwapSelectTokens
|
||||
import com.tangem.features.onramp.tokenlist.OnrampTokenListComponent
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import com.tangem.core.ui.components.token.state.TokenItemState
|
|||
import com.tangem.core.ui.decompose.ComposableContentComponent
|
||||
import com.tangem.domain.tokens.model.CryptoCurrencyStatus
|
||||
import com.tangem.domain.wallets.models.UserWalletId
|
||||
import com.tangem.features.onramp.entity.OnrampOperation
|
||||
import com.tangem.features.onramp.tokenlist.entity.OnrampOperation
|
||||
|
||||
/** Token list component that present list of token for multi-currency wallet */
|
||||
@Stable
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package com.tangem.features.onramp.entity
|
||||
package com.tangem.features.onramp.tokenlist.entity
|
||||
|
||||
/**
|
||||
* Onramp operation
|
||||
|
|
@ -14,8 +14,8 @@ import com.tangem.domain.tokens.GetTokenListUseCase
|
|||
import com.tangem.domain.tokens.model.CryptoCurrencyStatus
|
||||
import com.tangem.domain.tokens.model.TokenList
|
||||
import com.tangem.domain.wallets.usecase.GetWalletsUseCase
|
||||
import com.tangem.features.onramp.entity.OnrampOperation
|
||||
import com.tangem.features.onramp.impl.R
|
||||
import com.tangem.features.onramp.tokenlist.entity.OnrampOperation
|
||||
import com.tangem.features.onramp.tokenlist.OnrampTokenListComponent
|
||||
import com.tangem.features.onramp.tokenlist.entity.TokenListUM
|
||||
import com.tangem.features.onramp.tokenlist.entity.TokenListUMController
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue