Updated on 2026-08-14
This commit is contained in:
parent
c3f5ea4284
commit
b0963883d9
6 changed files with 7 additions and 1 deletions
|
|
@ -70,6 +70,7 @@ internal class PreviewCustomTokenSelectorComponent(
|
|||
),
|
||||
name = "Network $index",
|
||||
type = "N$index",
|
||||
currencySymbol = "N$index",
|
||||
iconResId = R.drawable.ic_eth_16,
|
||||
isMainNetwork = false,
|
||||
isSelected = n.id == params.selectedNetwork?.id,
|
||||
|
|
|
|||
|
|
@ -169,6 +169,7 @@ internal class PreviewManageTokensComponent(
|
|||
),
|
||||
name = "NETWORK$networkIndex",
|
||||
type = "N$networkIndex",
|
||||
currencySymbol = "N$networkIndex",
|
||||
iconResId = R.drawable.ic_eth_16,
|
||||
isMainNetwork = networkIndex == 0,
|
||||
isSelected = false,
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@ internal class PreviewOnboardingManageTokensComponent(
|
|||
),
|
||||
name = "NETWORK$networkIndex",
|
||||
type = "N$networkIndex",
|
||||
currencySymbol = "N$networkIndex",
|
||||
iconResId = R.drawable.ic_eth_16,
|
||||
isMainNetwork = networkIndex == 0,
|
||||
isSelected = false,
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ internal data class CurrencyNetworkUM(
|
|||
val network: Network,
|
||||
val name: String,
|
||||
val type: String,
|
||||
val currencySymbol: String,
|
||||
val iconResId: Int,
|
||||
val isMainNetwork: Boolean,
|
||||
val onLongClick: () -> Unit,
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ private fun NetworkItem(model: CurrencyNetworkUM, modifier: Modifier = Modifier)
|
|||
model = with(model) {
|
||||
ChainRowUM(
|
||||
name = name,
|
||||
type = type,
|
||||
type = currencySymbol,
|
||||
icon = CurrencyIconState.CoinIcon(
|
||||
url = null,
|
||||
fallbackResId = model.iconResId,
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ internal fun Network.toCurrencyNetworkModel(
|
|||
iconResId = id.getIconRes(isColored = true),
|
||||
isSelected = isSelected,
|
||||
type = standardType.name,
|
||||
currencySymbol = currencySymbol,
|
||||
onLongClick = {},
|
||||
isMainNetwork = false,
|
||||
onSelectedStateChange = onSelectedStateChange,
|
||||
|
|
@ -66,6 +67,7 @@ internal fun SourceNetwork.toCurrencyNetworkModel(
|
|||
iconResId = id.getIconRes(isColored = isSelected || !isEditable),
|
||||
isSelected = isSelected || !isEditable,
|
||||
type = typeName,
|
||||
currencySymbol = network.currencySymbol,
|
||||
onLongClick = { onLongTap(this) },
|
||||
isMainNetwork = this is SourceNetwork.Main,
|
||||
onSelectedStateChange = { selected ->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue