Updated on 2026-08-14
This commit is contained in:
parent
6ed1946ac3
commit
aac48015b3
88 changed files with 335 additions and 239 deletions
|
|
@ -48,7 +48,6 @@ class AccountPortfolioItemUMConverter(
|
|||
)
|
||||
UserWalletItemUM.Information.Loaded(text)
|
||||
}
|
||||
is Account.Payment -> TODO("[REDACTED_JIRA]")
|
||||
}
|
||||
|
||||
private fun getImageState(account: Account.CryptoPortfolio) = when (account) {
|
||||
|
|
@ -56,7 +55,6 @@ class AccountPortfolioItemUMConverter(
|
|||
name = account.accountName.toUM().value,
|
||||
icon = CryptoPortfolioIconConverter.convert(account.icon),
|
||||
)
|
||||
is Account.Payment -> TODO("[REDACTED_JIRA]")
|
||||
}
|
||||
|
||||
private fun getBalanceInfo(): UserWalletItemUM.Balance {
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ fun PortfolioSelectRow(
|
|||
|
||||
@Immutable
|
||||
data class PortfolioSelectUM(
|
||||
val icon: AccountIconUM.CryptoPortfolio?,
|
||||
val icon: AccountIconUM?,
|
||||
val name: TextReference,
|
||||
val isAccountMode: Boolean,
|
||||
val isMultiChoice: Boolean,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.tangem.common.ui.amountScreen.converters
|
||||
|
||||
import com.tangem.common.ui.account.AccountIconUM
|
||||
import com.tangem.common.ui.account.AccountTitleUM
|
||||
import com.tangem.common.ui.account.CryptoPortfolioIconConverter
|
||||
import com.tangem.common.ui.account.toUM
|
||||
|
|
@ -11,12 +12,12 @@ class AmountAccountConverter(
|
|||
private val prefixText: TextReference,
|
||||
private val isAccountsMode: Boolean,
|
||||
private val walletTitle: TextReference,
|
||||
) : Converter<Account.CryptoPortfolio?, AccountTitleUM> {
|
||||
override fun convert(value: Account.CryptoPortfolio?): AccountTitleUM {
|
||||
) : Converter<Account?, AccountTitleUM> {
|
||||
override fun convert(value: Account?): AccountTitleUM {
|
||||
return if (value != null && isAccountsMode) {
|
||||
AccountTitleUM.Account(
|
||||
name = value.accountName.toUM().value,
|
||||
icon = CryptoPortfolioIconConverter.convert(value.icon),
|
||||
icon = getAccountIcon(account = value),
|
||||
prefixText = prefixText,
|
||||
)
|
||||
} else {
|
||||
|
|
@ -25,4 +26,11 @@ class AmountAccountConverter(
|
|||
)
|
||||
}
|
||||
}
|
||||
|
||||
private fun getAccountIcon(account: Account): AccountIconUM {
|
||||
return when (account) {
|
||||
is Account.CryptoPortfolio -> CryptoPortfolioIconConverter.convert(account.icon)
|
||||
is Account.Payment -> AccountIconUM.Payment
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue