From d594af91fc5416096a7e1555c6ed955af6ee7d15 Mon Sep 17 00:00:00 2001 From: Tangem Date: Thu, 22 Jan 2026 12:31:40 +0500 Subject: [PATCH] Updated on 2026-08-14 --- .../account/AccountIconItemStateConverter.kt | 1 + .../AccountPortfolioItemUMConverter.kt | 29 ++++++++++--------- .../domain/account/models/AccountList.kt | 1 + .../DefaultSingleAccountStatusListProducer.kt | 2 ++ .../tangem/domain/models/account/Account.kt | 11 +++++++ .../entity/AccountCreateEditUMBuilder.kt | 1 + .../account/details/AccountDetailsModel.kt | 1 + .../converter/AvailableToAddDataConverter.kt | 1 + .../portfolio/add/impl/model/AddTokenModel.kt | 1 + .../impl/model/NewMarketsPortfolioDelegate.kt | 1 + .../model/CustomTokenSelectorModel.kt | 1 + .../converter/AvailableToAddDataConverter.kt | 1 + .../portfolio/add/impl/model/AddTokenModel.kt | 1 + .../impl/model/NewMarketsPortfolioDelegate.kt | 1 + .../transformer/UpdateDataStateTransformer.kt | 1 + .../connections/model/WcPairModel.kt | 2 ++ .../WcSessionsAccountModeTransformer.kt | 1 + .../converter/WcPortfolioNameDelegate.kt | 1 + 18 files changed, 45 insertions(+), 13 deletions(-) diff --git a/common/ui/src/main/java/com/tangem/common/ui/account/AccountIconItemStateConverter.kt b/common/ui/src/main/java/com/tangem/common/ui/account/AccountIconItemStateConverter.kt index f89a37e3db..102be5a837 100644 --- a/common/ui/src/main/java/com/tangem/common/ui/account/AccountIconItemStateConverter.kt +++ b/common/ui/src/main/java/com/tangem/common/ui/account/AccountIconItemStateConverter.kt @@ -20,5 +20,6 @@ object AccountIconItemStateConverter : Converter TODO("[REDACTED_JIRA]") } } \ No newline at end of file diff --git a/common/ui/src/main/java/com/tangem/common/ui/account/AccountPortfolioItemUMConverter.kt b/common/ui/src/main/java/com/tangem/common/ui/account/AccountPortfolioItemUMConverter.kt index d45ef488d1..baed1af4d7 100644 --- a/common/ui/src/main/java/com/tangem/common/ui/account/AccountPortfolioItemUMConverter.kt +++ b/common/ui/src/main/java/com/tangem/common/ui/account/AccountPortfolioItemUMConverter.kt @@ -22,21 +22,24 @@ class AccountPortfolioItemUMConverter( ) : Converter { override fun convert(value: Account): UserWalletItemUM { - return with(value) { - UserWalletItemUM( - id = accountId.value, - name = accountName.toUM().value, - information = getInfo(account = this), - balance = getBalanceInfo(), - isEnabled = isEnabled, - endIcon = endIcon, - onClick = onClick, - imageState = getImageState(account = this), - ) + return when (value) { + is Account.CryptoPortfolio -> with(value) { + UserWalletItemUM( + id = accountId.value, + name = accountName.toUM().value, + information = getInfo(account = this), + balance = getBalanceInfo(), + isEnabled = isEnabled, + endIcon = endIcon, + onClick = onClick, + imageState = getImageState(account = this), + ) + } + is Account.Payment -> TODO("[REDACTED_JIRA]") } } - private fun getInfo(account: Account): UserWalletItemUM.Information.Loaded = when (account) { + private fun getInfo(account: Account.CryptoPortfolio): UserWalletItemUM.Information.Loaded = when (account) { is Account.CryptoPortfolio -> { val text = pluralReference( R.plurals.common_tokens_count, @@ -47,7 +50,7 @@ class AccountPortfolioItemUMConverter( } } - private fun getImageState(account: Account) = when (account) { + private fun getImageState(account: Account.CryptoPortfolio) = when (account) { is Account.CryptoPortfolio -> UserWalletItemUM.ImageState.Account( name = account.accountName.toUM().value, icon = account.icon.toUM(), diff --git a/domain/account/src/main/java/com/tangem/domain/account/models/AccountList.kt b/domain/account/src/main/java/com/tangem/domain/account/models/AccountList.kt index db2dc28e25..0431d854da 100644 --- a/domain/account/src/main/java/com/tangem/domain/account/models/AccountList.kt +++ b/domain/account/src/main/java/com/tangem/domain/account/models/AccountList.kt @@ -99,6 +99,7 @@ data class AccountList private constructor( return accounts.flatMap { account -> when (account) { is Account.CryptoPortfolio -> account.cryptoCurrencies + is Account.Payment -> TODO("[REDACTED_JIRA]") } } } diff --git a/domain/account/status/src/main/java/com/tangem/domain/account/status/producer/DefaultSingleAccountStatusListProducer.kt b/domain/account/status/src/main/java/com/tangem/domain/account/status/producer/DefaultSingleAccountStatusListProducer.kt index bf10f519ad..77367a7909 100644 --- a/domain/account/status/src/main/java/com/tangem/domain/account/status/producer/DefaultSingleAccountStatusListProducer.kt +++ b/domain/account/status/src/main/java/com/tangem/domain/account/status/producer/DefaultSingleAccountStatusListProducer.kt @@ -97,6 +97,7 @@ internal class DefaultSingleAccountStatusListProducer @AssistedInject constructo } .distinctUntilChanged() } + is Account.Payment -> TODO("[REDACTED_JIRA]") } } } @@ -192,6 +193,7 @@ internal class DefaultSingleAccountStatusListProducer @AssistedInject constructo priceChangeLce = lceLoading(), ) } + is Account.Payment -> TODO("[REDACTED_JIRA]") } }, totalAccounts = accountList.totalAccounts, diff --git a/domain/models/src/main/kotlin/com/tangem/domain/models/account/Account.kt b/domain/models/src/main/kotlin/com/tangem/domain/models/account/Account.kt index 4b0f60f75a..af4f1fd430 100644 --- a/domain/models/src/main/kotlin/com/tangem/domain/models/account/Account.kt +++ b/domain/models/src/main/kotlin/com/tangem/domain/models/account/Account.kt @@ -174,4 +174,15 @@ sealed interface Account { } } } + + class Payment : Account { + override val accountId: AccountId + get() = TODO("Not yet implemented") + override val accountName: AccountName + get() = TODO("Not yet implemented") + + init { + error("Not yet implemented") + } + } } \ No newline at end of file diff --git a/features/account/impl/src/main/java/com/tangem/features/account/createedit/entity/AccountCreateEditUMBuilder.kt b/features/account/impl/src/main/java/com/tangem/features/account/createedit/entity/AccountCreateEditUMBuilder.kt index a3e921cf2d..b9944a8996 100644 --- a/features/account/impl/src/main/java/com/tangem/features/account/createedit/entity/AccountCreateEditUMBuilder.kt +++ b/features/account/impl/src/main/java/com/tangem/features/account/createedit/entity/AccountCreateEditUMBuilder.kt @@ -88,6 +88,7 @@ internal class AccountCreateEditUMBuilder( val Account.portfolioIcon: CryptoPortfolioIcon get() = when (this) { is Account.CryptoPortfolio -> this.icon + is Account.Payment -> TODO("[REDACTED_JIRA]") } fun AccountCreateEditUM.updateColorSelect(color: CryptoPortfolioIcon.Color): AccountCreateEditUM { diff --git a/features/account/impl/src/main/java/com/tangem/features/account/details/AccountDetailsModel.kt b/features/account/impl/src/main/java/com/tangem/features/account/details/AccountDetailsModel.kt index cb61bf3e8f..fad8eeb69f 100644 --- a/features/account/impl/src/main/java/com/tangem/features/account/details/AccountDetailsModel.kt +++ b/features/account/impl/src/main/java/com/tangem/features/account/details/AccountDetailsModel.kt @@ -153,6 +153,7 @@ internal class AccountDetailsModel @Inject constructor( isLoading = false, ) } + is Account.Payment -> TODO("[REDACTED_JIRA]") } val isMultiCurrency = getUserWalletUseCase(account.accountId.userWalletId).getOrNull() ?.isMultiCurrency == true diff --git a/features/feed/impl/src/main/kotlin/com/tangem/features/feed/components/market/details/portfolio/add/impl/converter/AvailableToAddDataConverter.kt b/features/feed/impl/src/main/kotlin/com/tangem/features/feed/components/market/details/portfolio/add/impl/converter/AvailableToAddDataConverter.kt index dd013d17ba..49d3820aa2 100644 --- a/features/feed/impl/src/main/kotlin/com/tangem/features/feed/components/market/details/portfolio/add/impl/converter/AvailableToAddDataConverter.kt +++ b/features/feed/impl/src/main/kotlin/com/tangem/features/feed/components/market/details/portfolio/add/impl/converter/AvailableToAddDataConverter.kt @@ -108,6 +108,7 @@ internal class AvailableToAddDataConverter @Inject constructor( ): CryptoCurrency? { val derivationIndex = when (account) { is Account.CryptoPortfolio -> account.derivationIndex + is Account.Payment -> TODO("[REDACTED_JIRA]") } return getTokenMarketCryptoCurrency( userWalletId = userWallet.walletId, diff --git a/features/feed/impl/src/main/kotlin/com/tangem/features/feed/components/market/details/portfolio/add/impl/model/AddTokenModel.kt b/features/feed/impl/src/main/kotlin/com/tangem/features/feed/components/market/details/portfolio/add/impl/model/AddTokenModel.kt index cedc618422..b8547e0118 100644 --- a/features/feed/impl/src/main/kotlin/com/tangem/features/feed/components/market/details/portfolio/add/impl/model/AddTokenModel.kt +++ b/features/feed/impl/src/main/kotlin/com/tangem/features/feed/components/market/details/portfolio/add/impl/model/AddTokenModel.kt @@ -96,6 +96,7 @@ internal class AddTokenModel @Inject constructor( is Account.CryptoPortfolio -> if (!account.isMainAccount) { analyticsEventHandler.send(analyticsEventBuilder.addToNotMainAccount()) } + is Account.Payment -> TODO("[REDACTED_JIRA]") } params.callbacks.onTokenAdded(status.status) } diff --git a/features/feed/impl/src/main/kotlin/com/tangem/features/feed/components/market/details/portfolio/impl/model/NewMarketsPortfolioDelegate.kt b/features/feed/impl/src/main/kotlin/com/tangem/features/feed/components/market/details/portfolio/impl/model/NewMarketsPortfolioDelegate.kt index 9fdad17c66..02e0ec8a02 100644 --- a/features/feed/impl/src/main/kotlin/com/tangem/features/feed/components/market/details/portfolio/impl/model/NewMarketsPortfolioDelegate.kt +++ b/features/feed/impl/src/main/kotlin/com/tangem/features/feed/components/market/details/portfolio/impl/model/NewMarketsPortfolioDelegate.kt @@ -271,6 +271,7 @@ internal class NewMarketsPortfolioDelegate @AssistedInject constructor( name = this.accountName.toUM().value, icon = when (this) { is Account.CryptoPortfolio -> this.icon.toUM() + is Account.Payment -> TODO("[REDACTED_JIRA]") }, ), ) diff --git a/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/model/CustomTokenSelectorModel.kt b/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/model/CustomTokenSelectorModel.kt index c57d03a4e8..2b6df47f38 100644 --- a/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/model/CustomTokenSelectorModel.kt +++ b/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/model/CustomTokenSelectorModel.kt @@ -215,6 +215,7 @@ internal class CustomTokenSelectorModel @Inject constructor( val accountName = when (account) { is Account.CryptoPortfolio -> account.accountName + is Account.Payment -> TODO("[REDACTED_JIRA]") null -> null } diff --git a/features/markets/impl/src/main/kotlin/com/tangem/features/markets/portfolio/add/impl/converter/AvailableToAddDataConverter.kt b/features/markets/impl/src/main/kotlin/com/tangem/features/markets/portfolio/add/impl/converter/AvailableToAddDataConverter.kt index 7004e37dfc..a9a11d6eb7 100644 --- a/features/markets/impl/src/main/kotlin/com/tangem/features/markets/portfolio/add/impl/converter/AvailableToAddDataConverter.kt +++ b/features/markets/impl/src/main/kotlin/com/tangem/features/markets/portfolio/add/impl/converter/AvailableToAddDataConverter.kt @@ -108,6 +108,7 @@ internal class AvailableToAddDataConverter @Inject constructor( ): CryptoCurrency? { val derivationIndex = when (account) { is Account.CryptoPortfolio -> account.derivationIndex + is Account.Payment -> TODO("[REDACTED_JIRA]") } return getTokenMarketCryptoCurrency( userWalletId = userWallet.walletId, diff --git a/features/markets/impl/src/main/kotlin/com/tangem/features/markets/portfolio/add/impl/model/AddTokenModel.kt b/features/markets/impl/src/main/kotlin/com/tangem/features/markets/portfolio/add/impl/model/AddTokenModel.kt index 7c5ba2defd..c00c3f15da 100644 --- a/features/markets/impl/src/main/kotlin/com/tangem/features/markets/portfolio/add/impl/model/AddTokenModel.kt +++ b/features/markets/impl/src/main/kotlin/com/tangem/features/markets/portfolio/add/impl/model/AddTokenModel.kt @@ -96,6 +96,7 @@ internal class AddTokenModel @Inject constructor( is Account.CryptoPortfolio -> if (!account.isMainAccount) { analyticsEventHandler.send(analyticsEventBuilder.addToNotMainAccount()) } + is Account.Payment -> TODO("[REDACTED_JIRA]") } params.callbacks.onTokenAdded(status.status) } diff --git a/features/markets/impl/src/main/kotlin/com/tangem/features/markets/portfolio/impl/model/NewMarketsPortfolioDelegate.kt b/features/markets/impl/src/main/kotlin/com/tangem/features/markets/portfolio/impl/model/NewMarketsPortfolioDelegate.kt index 9a6de7c950..eecadfc1a5 100644 --- a/features/markets/impl/src/main/kotlin/com/tangem/features/markets/portfolio/impl/model/NewMarketsPortfolioDelegate.kt +++ b/features/markets/impl/src/main/kotlin/com/tangem/features/markets/portfolio/impl/model/NewMarketsPortfolioDelegate.kt @@ -272,6 +272,7 @@ internal class NewMarketsPortfolioDelegate @AssistedInject constructor( name = this.accountName.toUM().value, icon = when (this) { is Account.CryptoPortfolio -> this.icon.toUM() + is Account.Payment -> TODO("[REDACTED_JIRA]") }, ), ) diff --git a/features/nft/impl/src/main/kotlin/com/tangem/features/nft/collections/entity/transformer/UpdateDataStateTransformer.kt b/features/nft/impl/src/main/kotlin/com/tangem/features/nft/collections/entity/transformer/UpdateDataStateTransformer.kt index 0e4605da31..e0256c93ba 100644 --- a/features/nft/impl/src/main/kotlin/com/tangem/features/nft/collections/entity/transformer/UpdateDataStateTransformer.kt +++ b/features/nft/impl/src/main/kotlin/com/tangem/features/nft/collections/entity/transformer/UpdateDataStateTransformer.kt @@ -101,6 +101,7 @@ internal class UpdateDataStateTransformer( name = this.accountName.toUM().value, icon = when (this) { is Account.CryptoPortfolio -> this.icon.toUM() + is Account.Payment -> TODO("[REDACTED_JIRA]") }, ), ) diff --git a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/connections/model/WcPairModel.kt b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/connections/model/WcPairModel.kt index e0a0182370..bdc6f34464 100644 --- a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/connections/model/WcPairModel.kt +++ b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/connections/model/WcPairModel.kt @@ -273,6 +273,7 @@ internal class WcPairModel @Inject constructor( val (wallet, portfolioAccount) = selectedPortfolio val account = when (val account = portfolioAccount.account) { is Account.CryptoPortfolio -> account + is Account.Payment -> TODO("[REDACTED_JIRA]") } val isAccountMode = selectorController.isAccountMode.first() val icon: CryptoPortfolioIconUM? @@ -325,6 +326,7 @@ internal class WcPairModel @Inject constructor( if (selectorController.isAccountModeSync() && account != null) { val derivationIndex = when (account) { is Account.CryptoPortfolio -> account.derivationIndex.value + is Account.Payment -> TODO("[REDACTED_JIRA]") } analytics.send(WcAnalyticAccountEvents.PairButtonConnect(derivationIndex)) } else { diff --git a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/connections/model/transformers/WcSessionsAccountModeTransformer.kt b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/connections/model/transformers/WcSessionsAccountModeTransformer.kt index a36142ec24..598ca31911 100644 --- a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/connections/model/transformers/WcSessionsAccountModeTransformer.kt +++ b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/connections/model/transformers/WcSessionsAccountModeTransformer.kt @@ -64,6 +64,7 @@ internal class WcSessionsAccountModeTransformer( } val accountIcon = when (account) { is Account.CryptoPortfolio -> account.icon + is Account.Payment -> TODO("[REDACTED_JIRA]") } val accountTitle = AccountTitleUM.Account( diff --git a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/converter/WcPortfolioNameDelegate.kt b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/converter/WcPortfolioNameDelegate.kt index 7273f94398..ce57447912 100644 --- a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/converter/WcPortfolioNameDelegate.kt +++ b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/converter/WcPortfolioNameDelegate.kt @@ -24,6 +24,7 @@ internal class WcPortfolioNameDelegate @AssistedInject constructor( fun createAccountTitleUM(value: WcSession): AccountTitleUM? { val account = when (val account = value.account) { is Account.CryptoPortfolio -> account + is Account.Payment -> TODO("[REDACTED_JIRA]") null -> null }