Updated on 2026-08-14

This commit is contained in:
Tangem 2026-06-24 17:21:35 +03:00
commit b2da68216a
501 changed files with 16767 additions and 5720 deletions

View file

@ -6,6 +6,7 @@ import android.annotation.SuppressLint
import android.os.Bundle
import com.tangem.common.routing.bundle.RouteBundleParams
import com.tangem.common.routing.bundle.bundle
import com.tangem.common.routing.entity.AddressBookOpenMode
import com.tangem.common.routing.entity.InitScreenLaunchMode
import com.tangem.core.analytics.models.AnalyticsParam
import com.tangem.core.decompose.navigation.Route
@ -174,8 +175,15 @@ sealed class AppRoute(val path: String) : Route {
@Serializable
data class AddressBook(
val predefinedAddress: String? = null,
) : AppRoute(path = "/address_book/predefinedAddress/$predefinedAddress")
val addressBookOpenMode: AddressBookOpenMode = AddressBookOpenMode.Default,
) : AppRoute(
path = when (addressBookOpenMode) {
is AddressBookOpenMode.WithContactCreation ->
"/address_book/${addressBookOpenMode.address}-${addressBookOpenMode.networkId}"
is AddressBookOpenMode.ContactSelection -> "/address_book/select/${addressBookOpenMode.networkId}"
AddressBookOpenMode.Default -> "/address_book"
},
)
@Serializable
data class QrScanning(val source: Source) : AppRoute(path = "/$source/qr_scanning${source.path}") {
@ -324,11 +332,6 @@ sealed class AppRoute(val path: String) : Route {
val userWalletId: UserWalletId,
) : AppRoute(path = "/sell_crypto/${userWalletId.stringValue}")
@Serializable
data class SwapCrypto(
val userWalletId: UserWalletId,
) : AppRoute(path = "/swap_crypto/${userWalletId.stringValue}")
/**
* Onboarding V2
* @property scanResponse scan response, determines onboarding route by the product type

View file

@ -0,0 +1,26 @@
package com.tangem.common.routing.entity
import kotlinx.serialization.Serializable
/** How the address book is opened — part of the navigation contract, carried by [com.tangem.common.routing.AppRoute.AddressBook]. */
@Serializable
sealed interface AddressBookOpenMode {
@Serializable
data object Default : AddressBookOpenMode
@Serializable
data class WithContactCreation(
val address: String,
val networkId: String,
) : AddressBookOpenMode
/**
* Opened from the Send flow to pick a recipient. The list is filtered by [networkId] (the current send network),
* and the chosen contact's address is delivered back via `ContactSelectionTrigger` rather than navigation.
*/
@Serializable
data class ContactSelection(
val networkId: String,
) : AddressBookOpenMode
}

View file

@ -1,8 +1,10 @@
package com.tangem.common.ui.account
import androidx.compose.runtime.Immutable
import com.tangem.domain.models.account.CryptoPortfolioIcon.Color
import com.tangem.domain.models.account.CryptoPortfolioIcon.Icon
@Immutable
sealed class AccountIconUM {
data class CryptoPortfolio(val value: Icon, val color: Color) : AccountIconUM()