Updated on 2026-08-14

This commit is contained in:
Tangem 2025-11-19 17:09:50 +04:00
parent 18201957b1
commit f368e6a2f5
15 changed files with 121 additions and 122 deletions

View file

@ -37,7 +37,7 @@ sealed interface AccountNameUM {
*
* @property raw the raw string value of the custom account name
*/
data class Custom(internal val raw: String) : AccountNameUM {
data class Custom(val raw: String) : AccountNameUM {
override val value: TextReference = stringReference(value = raw)
}

View file

@ -1,7 +1,7 @@
==========================================
Detekt Baseline Updater & Issue Counter
==========================================
Date: 2025-11-18 15:11:30
Date: 2025-11-19 15:21:36
Updating detekt baseline for debug variant...
@ -13,13 +13,13 @@ Counting issues in baseline files...
==========================================
Summary:
Total Issues: 1798
Total Issues: 1778
Modules with Issues: 91
Average Issues per Module: 19
Progress:
Fixed: 4 out of 1802 (0%)
Remaining: 1798
Fixed: 24 out of 1802 (1%)
Remaining: 1778
==========================================
All Modules with Issues (sorted by count)
@ -27,7 +27,7 @@ All Modules with Issues (sorted by count)
Module Issues
────────────────────────────────────────────────────────────────
features/wallet/impl 171
features/wallet/impl 170
features/markets/impl 155
features/onboarding-v2/impl 137
features/onramp/impl 89
@ -51,7 +51,6 @@ core/ui 27
common/ui 26
features/tangempay/details/impl 24
data/visa 24
features/account/impl 23
features/wallet-settings/impl 21
data/nft 20
features/swap/data 15
@ -85,6 +84,7 @@ domain/legacy 5
data/transaction 5
features/referral/domain 4
features/biometry/impl 4
features/account/impl 4
features/account/api 4
data/promo 4
core/config-toggles 4

View file

@ -2,28 +2,9 @@
<SmellBaseline>
<ManuallySuppressedIssues/>
<CurrentIssues>
<ID>BooleanPropertyNaming:AccountCreateEditModel.kt$AccountCreateEditModel$val duplicateAccountNames = (error as? AddCryptoPortfolioUseCase.Error.AccountListRequirementsNotMet) ?.cause is AccountList.Error.DuplicateAccountNames</ID>
<ID>BooleanPropertyNaming:AccountCreateEditModel.kt$AccountCreateEditModel$val duplicateAccountNames = (error as? UpdateCryptoPortfolioUseCase.Error.AccountListRequirementsNotMet) ?.cause is AccountList.Error.DuplicateAccountNames</ID>
<ID>BooleanPropertyNaming:AccountCreateEditModel.kt$AccountCreateEditModel$val showConfirmDialog = uiState.value.buttonState.isButtonEnabled</ID>
<ID>BooleanPropertyNaming:AccountCreateEditUM.kt$AccountCreateEditUM.Button$val showProgress: Boolean</ID>
<ID>MultilineLambdaItParameter:AccountCreateEditContent.kt${ /* * If the user had the default main account name and enters the same name during renaming, * we should use the default value instead of custom to avoid breaking the name validation process. */ val newName = if (wasDefault &amp;&amp; it == defaultAccountName) { AccountNameUM.DefaultMain } else { AccountNameUM.Custom(raw = it) } account.onNameChange(newName) }</ID>
<ID>MultilineLambdaItParameter:ArchivedAccountListContent.kt$PreviewStateProvider${ ArchivedAccountUM( accountId = it.toString(), accountName = accountName, accountIconUM = portfolioIcon(), tokensInfo = stringReference("10 tokens"), networksInfo = stringReference("2 networks"), onClick = {}, isLoading = it % 2 == 0, ) }</ID>
<ID>NamedArguments:PortfolioSelectorModel.kt$PortfolioSelectorModel$buildAccountsList(portfolioData, artworks, isEnabled, selectedAccount)</ID>
<ID>NamedArguments:PortfolioSelectorModel.kt$PortfolioSelectorModel$buildUiList(isAccountsMode, portfolioData, artworks, isEnabled, selectedAccount)</ID>
<ID>NamedArguments:PortfolioSelectorModel.kt$PortfolioSelectorModel$buildWalletList(portfolioData, artworks, isEnabled, selectedAccount)</ID>
<ID>NonBooleanPropertyPrefixedWithIs:DefaultPortfolioSelectorController.kt$DefaultPortfolioSelectorController$override val isAccountMode: Flow&lt;Boolean&gt; by lazy { isAccountsModeEnabledUseCase() }</ID>
<ID>NonBooleanPropertyPrefixedWithIs:DefaultPortfolioSelectorController.kt$DefaultPortfolioSelectorController$override val isEnabled: MutableStateFlow&lt;(UserWallet, AccountStatus) -&gt; Boolean&gt; = MutableStateFlow { _, _ -&gt; true }</ID>
<ID>NonBooleanPropertyPrefixedWithIs:DefaultPortfolioSelectorController.kt$DefaultPortfolioSelectorController$private val isAccountsModeEnabledUseCase: IsAccountsModeEnabledUseCase</ID>
<ID>NonBooleanPropertyPrefixedWithIs:PortfolioSelectorModel.kt$PortfolioSelectorModel$private val isAccountsModeEnabledUseCase: IsAccountsModeEnabledUseCase</ID>
<ID>NullableBooleanCheck:AccountDetailsModel.kt$AccountDetailsModel$getUserWalletUseCase(account.accountId.userWalletId) .getOrNull()?.isMultiCurrency ?: false</ID>
<ID>PropertyUsedBeforeDeclaration:AccountDetailsModel.kt$AccountDetailsModel$_uiState</ID>
<ID>PropertyUsedBeforeDeclaration:ArchivedAccountListModel.kt$ArchivedAccountListModel$_uiState</ID>
<ID>UnnecessaryLet:ArchivedAccountListModel.kt$ArchivedAccountListModel$let { _uiState.value = newState }</ID>
<ID>UnnecessaryLet:PortfolioSelectorContent.kt$PortfolioSelectorPreviewData$let(::add)</ID>
<ID>UnusedImports:PortfolioSelectorBS.kt$import androidx.compose.foundation.background</ID>
<ID>UseEmptyCounterpart:AccountCreateEditModel.kt$AccountCreateEditModel$mapOf()</ID>
<ID>UseEmptyCounterpart:ArchivedAccountListModel.kt$ArchivedAccountListModel$mapOf()</ID>
<ID>VarCouldBeVal:AccountDetailsContent.kt$PreviewStateProvider$var portfolioIcon = AccountIconPreviewData.randomAccountIcon()</ID>
<ID>VarCouldBeVal:ArchivedAccountListModel.kt$ArchivedAccountListModel$private var getArchivedAccountsJob = JobHolder()</ID>
</CurrentIssues>
</SmellBaseline>

View file

@ -46,9 +46,10 @@ internal class ArchivedAccountListModel @Inject constructor(
private val params = paramsContainer.require<ArchivedAccountListComponent.Params>()
private val onCloseClick = { router.pop() }
val uiState: StateFlow<AccountArchivedUM> get() = _uiState
private val _uiState: MutableStateFlow<AccountArchivedUM> = MutableStateFlow(getInitialState())
private var getArchivedAccountsJob = JobHolder()
val uiState: StateFlow<AccountArchivedUM>
field = MutableStateFlow(getInitialState())
private val getArchivedAccountsJob = JobHolder()
init {
getArchivedAccounts()
@ -85,7 +86,9 @@ internal class ArchivedAccountListModel @Inject constructor(
},
)
newState?.let { _uiState.value = newState }
if (newState != null) {
uiState.value = newState
}
}
.flowOn(dispatchers.default)
.launchIn(modelScope)
@ -93,11 +96,11 @@ internal class ArchivedAccountListModel @Inject constructor(
}
private fun recoverCryptoPortfolio(accountId: AccountId) = modelScope.launch {
_uiState.update { it.toggleProgress(accountId, isLoading = true) }
uiState.update { it.toggleProgress(accountId, isLoading = true) }
val result = withContext(dispatchers.default) {
recoverCryptoPortfolioUseCase(accountId)
}
_uiState.update { it.toggleProgress(accountId, isLoading = false) }
uiState.update { it.toggleProgress(accountId, isLoading = false) }
result
.onLeft(::handleRecoverError)
.onRight {
@ -134,7 +137,7 @@ internal class ArchivedAccountListModel @Inject constructor(
messageSender.showErrorDialog(universalError = featureError, onDismiss = router::pop)
}
private fun logError(error: AccountFeatureError, params: Map<String, String> = mapOf()) {
private fun logError(error: AccountFeatureError, params: Map<String, String> = emptyMap()) {
val exception = IllegalStateException(error.toString())
Timber.e(exception)

View file

@ -170,15 +170,15 @@ private class PreviewStateProvider : CollectionPreviewParameterProvider<AccountA
fun portfolioIcon() = AccountIconPreviewData.randomAccountIcon()
val accountName = stringReference("Account name")
val firstList = List(10) {
val firstList = List(10) { id ->
ArchivedAccountUM(
accountId = it.toString(),
accountId = id.toString(),
accountName = accountName,
accountIconUM = portfolioIcon(),
tokensInfo = stringReference("10 tokens"),
networksInfo = stringReference("2 networks"),
onClick = {},
isLoading = it % 2 == 0,
isLoading = id % 2 == 0,
)
}.toImmutableList()
val first = AccountArchivedUM.Content(

View file

@ -124,10 +124,10 @@ internal class AccountCreateEditModel @Inject constructor(
}
private fun handleAddAccountError(error: AddCryptoPortfolioUseCase.Error) {
val duplicateAccountNames = (error as? AddCryptoPortfolioUseCase.Error.AccountListRequirementsNotMet)
val isDuplicateAccountNamesError = (error as? AddCryptoPortfolioUseCase.Error.AccountListRequirementsNotMet)
?.cause is AccountList.Error.DuplicateAccountNames
when {
duplicateAccountNames -> showAccountNameExist()
isDuplicateAccountNamesError -> showAccountNameExist()
else -> {
showSomethingWrong()
logError(error = AccountFeatureError.CreateAccount.FailedToCreateAccount(cause = error))
@ -159,10 +159,10 @@ internal class AccountCreateEditModel @Inject constructor(
}
private fun handleEditAccountError(error: UpdateCryptoPortfolioUseCase.Error) {
val duplicateAccountNames = (error as? UpdateCryptoPortfolioUseCase.Error.AccountListRequirementsNotMet)
val isDuplicateAccountNamesError = (error as? UpdateCryptoPortfolioUseCase.Error.AccountListRequirementsNotMet)
?.cause is AccountList.Error.DuplicateAccountNames
when {
duplicateAccountNames -> showAccountNameExist()
isDuplicateAccountNamesError -> showAccountNameExist()
else -> {
showSomethingWrong()
logError(error = AccountFeatureError.EditAccount.FailedToEditAccount(cause = error))
@ -176,30 +176,39 @@ internal class AccountCreateEditModel @Inject constructor(
}
private fun onCloseClick() {
val showConfirmDialog = uiState.value.buttonState.isButtonEnabled
if (showConfirmDialog) unsaveChangeDialog() else router.pop()
val shouldShowConfirmDialog = uiState.value.buttonState.isButtonEnabled
if (shouldShowConfirmDialog) unsaveChangeDialog() else router.pop()
}
private fun onIconSelect(icon: CryptoPortfolioIcon.Icon) {
uiState.value = uiState.value
.updateIconSelect(icon)
.validateNewState()
uiState.update { currentState ->
currentState.updateIconSelect(icon)
.validateNewState()
}
}
private fun onColorSelect(color: CryptoPortfolioIcon.Color) {
uiState.value = uiState.value
.updateColorSelect(color)
.validateNewState()
uiState.update { currentState ->
currentState.updateColorSelect(color)
.validateNewState()
}
}
private fun onNameChange(name: AccountNameUM) {
uiState.value = uiState.value
.updateName(name)
.validateNewState()
val isNotEmptyCustomName = (name as? AccountNameUM.Custom)?.raw?.isNotEmpty() == true
if (!name.isValidName() && isNotEmptyCustomName) {
Timber.d("Invalid account name: $name")
return
}
uiState.update { currentState ->
currentState.updateName(name)
.validateNewState()
}
}
private fun AccountCreateEditUM.validateNewState(): AccountCreateEditUM {
val isValidName = this.account.name.toDomain().isRight()
val isValidName = this.account.name.isValidName()
val isAvailableForConfirm = when (params) {
is AccountCreateEditComponent.Params.Create -> isValidName
is AccountCreateEditComponent.Params.Edit -> {
@ -213,6 +222,8 @@ internal class AccountCreateEditModel @Inject constructor(
return this.updateButton(isButtonEnabled = isAvailableForConfirm)
}
private fun AccountNameUM.isValidName(): Boolean = this.toDomain().isRight()
private fun getInitialState(): AccountCreateEditUM {
return AccountCreateEditUM(
title = umBuilder.toolbarTitle,
@ -250,7 +261,7 @@ internal class AccountCreateEditModel @Inject constructor(
}
}
private fun logError(error: AccountFeatureError, params: Map<String, String> = mapOf()) {
private fun logError(error: AccountFeatureError, params: Map<String, String> = emptyMap()) {
val exception = IllegalStateException(error.toString())
Timber.e(exception)

View file

@ -51,7 +51,7 @@ internal data class AccountCreateEditUM(
data class Button(
val isButtonEnabled: Boolean,
val showProgress: Boolean,
val shouldShowProgress: Boolean,
val onConfirmClick: () -> Unit,
val text: TextReference,
)

View file

@ -77,7 +77,7 @@ internal class AccountCreateEditUMBuilder(
}
return AccountCreateEditUM.Button(
isButtonEnabled = false,
showProgress = false,
shouldShowProgress = false,
onConfirmClick = onConfirmClick,
text = text,
)
@ -119,7 +119,7 @@ internal class AccountCreateEditUMBuilder(
}
fun AccountCreateEditUM.toggleProgress(showProgress: Boolean): AccountCreateEditUM {
return this.copy(buttonState = this.buttonState.copy(showProgress = showProgress))
return this.copy(buttonState = this.buttonState.copy(shouldShowProgress = showProgress))
}
fun AccountCreateEditUM.updateDerivationIndex(derivationIndex: Int): AccountCreateEditUM {

View file

@ -80,7 +80,7 @@ internal fun AccountCreateEditContent(state: AccountCreateEditUM, modifier: Modi
color = TangemTheme.colors.text.tertiary,
)
}
if (state.buttonState.showProgress) {
if (state.buttonState.shouldShowProgress) {
focusManager.clearFocus()
keyboardController?.hide()
}
@ -89,7 +89,7 @@ internal fun AccountCreateEditContent(state: AccountCreateEditUM, modifier: Modi
.fillMaxWidth()
.padding(16.dp),
enabled = state.buttonState.isButtonEnabled,
showProgress = state.buttonState.showProgress,
showProgress = state.buttonState.shouldShowProgress,
text = state.buttonState.text.resolveReference(),
onClick = state.buttonState.onConfirmClick,
)
@ -129,15 +129,15 @@ private fun AccountSummary(account: Account) {
placeholder = account.inputPlaceholder,
value = account.name.value.resolveReference(),
singleLine = true,
onValueChange = {
onValueChange = { value ->
/*
* If the user had the default main account name and enters the same name during renaming,
* we should use the default value instead of custom to avoid breaking the name validation process.
*/
val newName = if (wasDefault && it == defaultAccountName) {
val newName = if (wasDefault && value == defaultAccountName) {
AccountNameUM.DefaultMain
} else {
AccountNameUM.Custom(raw = it)
AccountNameUM.Custom(raw = value)
}
account.onNameChange(newName)
@ -321,7 +321,7 @@ private class PreviewStateProvider : CollectionPreviewParameterProvider<AccountC
),
buttonState = AccountCreateEditUM.Button(
isButtonEnabled = false,
showProgress = false,
shouldShowProgress = false,
onConfirmClick = {},
text = stringReference("Add account"),
),
@ -355,7 +355,7 @@ private class PreviewStateProvider : CollectionPreviewParameterProvider<AccountC
),
buttonState = AccountCreateEditUM.Button(
isButtonEnabled = false,
showProgress = false,
shouldShowProgress = false,
onConfirmClick = {},
text = stringReference("Save"),
),

View file

@ -42,13 +42,14 @@ internal class AccountDetailsModel @Inject constructor(
private val params = paramsContainer.require<AccountDetailsComponent.Params>()
val uiState: StateFlow<AccountDetailsUM> get() = _uiState
private val _uiState: MutableStateFlow<AccountDetailsUM> = MutableStateFlow(buildUI(params.account))
val uiState: StateFlow<AccountDetailsUM>
field = MutableStateFlow(buildUI(params.account))
private val accountId = params.account.accountId
init {
singleAccountSupplier(SingleAccountProducer.Params(accountId))
.onEach { account -> _uiState.update { buildUI(account) } }
.onEach { account -> uiState.update { buildUI(account) } }
.launchIn(modelScope)
}
@ -89,11 +90,11 @@ internal class AccountDetailsModel @Inject constructor(
}
private fun archiveCryptoPortfolio() = modelScope.launch {
_uiState.update { it.toggleProgress(true) }
uiState.update { it.toggleProgress(true) }
archiveCryptoPortfolioUseCase(accountId)
.onLeft { error ->
failedArchiveDialog(error)
_uiState.update { it.toggleProgress(false) }
uiState.update { it.toggleProgress(false) }
}
.onRight {
val message = resourceReference(R.string.account_archive_success_message)
@ -136,8 +137,8 @@ internal class AccountDetailsModel @Inject constructor(
)
}
}
val isMultiCurrency = getUserWalletUseCase(account.accountId.userWalletId)
.getOrNull()?.isMultiCurrency ?: false
val isMultiCurrency = getUserWalletUseCase(account.accountId.userWalletId).getOrNull()
?.isMultiCurrency == true
return AccountDetailsUM(
accountName = account.accountName.toUM().value,
accountIcon = account.portfolioIcon.toUM(),

View file

@ -196,7 +196,7 @@ private val archiveModeAvailable
private class PreviewStateProvider : CollectionPreviewParameterProvider<AccountDetailsUM>(
buildList {
val accountName = "Main"
var portfolioIcon = AccountIconPreviewData.randomAccountIcon()
val portfolioIcon = AccountIconPreviewData.randomAccountIcon()
val first = AccountDetailsUM(
onCloseClick = {},
onAccountEditClick = {},

View file

@ -53,7 +53,13 @@ internal class PortfolioSelectorModel @Inject constructor(
flow4 = selectorController.isEnabled,
flow5 = selectedAccountState,
transform = { isAccountsMode, portfolioData, artworks, isEnabled, selectedAccount ->
val uiList = buildUiList(isAccountsMode, portfolioData, artworks, isEnabled, selectedAccount)
val uiList = buildUiList(
isAccountsMode = isAccountsMode,
portfolioData = portfolioData,
artworks = artworks,
isEnabled = isEnabled,
selectedAccount = selectedAccount,
)
val title = when (isAccountsMode) {
true -> resourceReference(R.string.common_choose_account)
false -> resourceReference(R.string.common_choose_wallet)
@ -75,8 +81,18 @@ internal class PortfolioSelectorModel @Inject constructor(
isEnabled: (UserWallet, AccountStatus) -> Boolean,
selectedAccount: AccountId?,
): List<PortfolioSelectorItemUM> = when (isAccountsMode) {
true -> buildAccountsList(portfolioData, artworks, isEnabled, selectedAccount)
false -> buildWalletList(portfolioData, artworks, isEnabled, selectedAccount)
true -> buildAccountsList(
portfolioData = portfolioData,
artworks = artworks,
isEnabled = isEnabled,
selectedAccount = selectedAccount,
)
false -> buildWalletList(
portfolioData = portfolioData,
artworks = artworks,
isEnabled = isEnabled,
selectedAccount = selectedAccount,
)
}
private fun buildWalletList(

View file

@ -1,7 +1,6 @@
package com.tangem.features.account.selector.ui
import android.content.res.Configuration
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.padding
import androidx.compose.runtime.Composable

View file

@ -161,76 +161,65 @@ internal object PortfolioSelectorPreviewData {
get() = walletItem.copy(isEnabled = false)
val firstList
get() = buildList {
get() = listOf(
PortfolioSelectorItemUM.GroupTitle(
id = UUID.randomUUID().toString(),
name = stringReference("Tangem 2.0"),
).let(::add)
accountItem
.let { PortfolioSelectorItemUM.Portfolio(it, false) }
.let(::add)
lockedAccountItem
.let { PortfolioSelectorItemUM.Portfolio(it, false) }
.let(::add)
),
PortfolioSelectorItemUM.Portfolio(accountItem, false),
PortfolioSelectorItemUM.Portfolio(lockedAccountItem, false),
PortfolioSelectorItemUM.GroupTitle(
id = UUID.randomUUID().toString(),
name = stringReference("Tangem White"),
).let(::add)
accountItem.let { PortfolioSelectorItemUM.Portfolio(it, true) }
.let(::add)
}
),
PortfolioSelectorItemUM.Portfolio(accountItem, true),
)
val secondList
get() = firstList + buildList {
get() = firstList + listOf(
PortfolioSelectorItemUM.GroupTitle(
id = UUID.randomUUID().toString(),
name = resourceReference(R.string.common_locked_wallets),
).let(::add)
add(PortfolioSelectorItemUM.Portfolio(lockedWalletItem, false))
add(PortfolioSelectorItemUM.Portfolio(lockedWalletItem, false))
}
),
PortfolioSelectorItemUM.Portfolio(lockedWalletItem, false),
PortfolioSelectorItemUM.Portfolio(lockedWalletItem, false),
)
val walletList
get() = buildList {
add(PortfolioSelectorItemUM.Portfolio(walletItem, false))
add(PortfolioSelectorItemUM.Portfolio(walletItem, true))
}
get() = listOf(
PortfolioSelectorItemUM.Portfolio(walletItem, false),
PortfolioSelectorItemUM.Portfolio(walletItem, true),
)
val lockedWalletList
get() = buildList {
add(PortfolioSelectorItemUM.Portfolio(walletItem, true))
val title = PortfolioSelectorItemUM.GroupTitle(
get() = listOf(
PortfolioSelectorItemUM.Portfolio(walletItem, true),
PortfolioSelectorItemUM.GroupTitle(
id = UUID.randomUUID().toString(),
name = resourceReference(R.string.common_locked_wallets),
)
add(title)
add(PortfolioSelectorItemUM.Portfolio(lockedWalletItem, false))
add(PortfolioSelectorItemUM.Portfolio(lockedWalletItem, false))
}
),
PortfolioSelectorItemUM.Portfolio(lockedWalletItem, false),
PortfolioSelectorItemUM.Portfolio(lockedWalletItem, false),
)
}
internal class PortfolioSelectorPreviewStateProvider : CollectionPreviewParameterProvider<PortfolioSelectorUM>(
buildList {
val first = PortfolioSelectorUM(
listOf(
PortfolioSelectorUM(
title = resourceReference(R.string.common_choose_account),
items = firstList.toImmutableList(),
)
val second = PortfolioSelectorUM(
),
PortfolioSelectorUM(
title = resourceReference(R.string.common_choose_account),
items = secondList.toImmutableList(),
)
val walletListUM = PortfolioSelectorUM(
),
PortfolioSelectorUM(
title = resourceReference(R.string.common_choose_wallet),
items = walletList.toImmutableList(),
)
val lockedWalletListUM =
PortfolioSelectorUM(
title = resourceReference(R.string.common_choose_wallet),
items = lockedWalletList.toImmutableList(),
)
add(first)
add(second)
add(walletListUM)
add(lockedWalletListUM)
},
),
PortfolioSelectorUM(
title = resourceReference(R.string.common_choose_wallet),
items = lockedWalletList.toImmutableList(),
),
),
)

View file

@ -78,7 +78,6 @@
<ID>MultilineLambdaItParameter:WalletModel.kt$WalletModel${ walletScreenContentLoader.load( userWallet = it, clickIntents = clickIntents, coroutineScope = modelScope, isRefresh = true, ) }</ID>
<ID>MultilineLambdaItParameter:WalletModel.kt$WalletModel${ walletsUpdateActionResolver.resolve( wallets = it, currentState = stateHolder.value, ) }</ID>
<ID>MultilineLambdaItParameter:WalletNFTListSubscriber.kt$WalletNFTListSubscriber${ stateHolder.update( SetNFTCollectionsTransformer( userWalletId = userWallet.walletId, nftCollections = it, onItemClick = { clickIntents.onNFTClick(userWallet) }, ), ) }</ID>
<ID>MultilineLambdaItParameter:WalletNFTListSubscriberV2.kt$WalletNFTListSubscriberV2${ stateController.update( SetNFTCollectionsTransformer( userWalletId = userWallet.walletId, nftCollections = it, onItemClick = { clickIntents.onNFTClick(userWallet) }, ), ) }</ID>
<ID>MultilineLambdaItParameter:WalletNameMigrationUseCase.kt$WalletNameMigrationUseCase${ val defaultName = it.name val suggestedWalletName = suggestedWalletName(defaultName, existingNames) if (defaultName != suggestedWalletName) { userWalletsListRepository.saveWithoutLock(it.copy(name = suggestedWalletName), canOverride = true) } Timber.tag("Migrated names").e(it.walletId.toString() + " " + suggestedWalletName) }</ID>
<ID>MultilineLambdaItParameter:WalletNotifications.kt${ // TODO develop promo banner general component when (it) { is WalletNotification.SwapPromo -&gt; { // Use it on new promo action } is WalletNotification.NoteMigration -&gt; { NoteMigrationNotification( config = it.config, modifier = modifier.animateItem(fadeInSpec = null, fadeOutSpec = null), ) } is WalletNotification.FinishWalletActivation -&gt; { Notification( config = it.config, modifier = modifier.animateItem(fadeInSpec = null, fadeOutSpec = null), ) } else -&gt; { Notification( config = it.config, modifier = modifier.animateItem(fadeInSpec = null, fadeOutSpec = null), iconTint = when (it) { is WalletNotification.Critical -&gt; TangemTheme.colors.icon.warning is WalletNotification.Informational -&gt; TangemTheme.colors.icon.accent is WalletNotification.RateApp -&gt; TangemTheme.colors.icon.attention is WalletNotification.UnlockWallets -&gt; TangemTheme.colors.icon.primary1 is WalletNotification.UsedOutdatedData -&gt; TangemTheme.colors.text.attention else -&gt; null }, ) } } }</ID>
<ID>MultilineLambdaItParameter:WalletScreen.kt${ PaddingValues( bottom = it.calculateBottomPadding() + marketHintAproxHeight + 52.dp, ) }</ID>