Updated on 2026-08-14

This commit is contained in:
Tangem 2026-04-28 17:03:15 +04:00
parent 596cbb40cb
commit eb6d4806e6
16 changed files with 291 additions and 710 deletions

View file

@ -76,6 +76,7 @@ interface AddToPortfolioManager : AddToPortfolioManagerInternal {
companion object {
val DefaultMarket = Settings(shouldSkipTokenActionsScreen = false)
val ChooseToken = Settings(shouldSkipTokenActionsScreen = true)
val Earn = Settings(shouldSkipTokenActionsScreen = true)
}
}

View file

@ -1,38 +0,0 @@
package com.tangem.features.commonfeatures.api.addtoportfolio
import com.tangem.core.decompose.factory.ComponentFactory
import com.tangem.core.ui.decompose.ComposableBottomSheetComponent
import com.tangem.domain.markets.TokenMarketInfo
import com.tangem.domain.models.currency.CryptoCurrency
import com.tangem.domain.models.wallet.UserWalletId
import kotlinx.serialization.Serializable
interface AddToPortfolioPreselectedDataComponent : ComposableBottomSheetComponent {
/**
* @param tokenToAdd token and preselected network (no network selector).
* @param callback callbacks for add-to-portfolio flow.
*/
data class Params(
val tokenToAdd: TokenToAdd,
val callback: Callback,
val analyticsParams: AnalyticsParams,
)
data class AnalyticsParams(val source: String)
interface Callback {
fun onDismiss()
fun onSuccess(addedToken: CryptoCurrency, walletId: UserWalletId)
}
@Serializable
data class TokenToAdd(
val network: TokenMarketInfo.Network,
val id: CryptoCurrency.RawID,
val name: String,
val symbol: String,
)
interface Factory : ComponentFactory<Params, AddToPortfolioPreselectedDataComponent>
}