From f5be772c91c843d53639e03834adef81c194c9bc Mon Sep 17 00:00:00 2001 From: Tangem Date: Fri, 12 Dec 2025 13:04:20 +0500 Subject: [PATCH] Updated on 2026-08-14 --- common/ui/detekt-baseline-debug.xml | 2 - data/nft/detekt-baseline-debug.xml | 1 - data/visa/detekt-baseline-debug.xml | 1 - data/wallet-connect/detekt-baseline-debug.xml | 1 - detekt_baseline_report.txt | 22 +++--- .../hot-wallet/impl/detekt-baseline-debug.xml | 2 - .../send-v2/api/detekt-baseline-debug.xml | 11 --- .../api/analytics/CommonSendAnalyticEvents.kt | 2 +- .../send/v2/api/entry/SendEntryRoute.kt | 2 +- .../CommonSendAmountAnalyticEvents.kt | 2 +- .../analytics/CommonSendFeeAnalyticEvents.kt | 2 +- .../feeSelector/entity/FeeSelectorData.kt | 2 +- .../send-v2/impl/detekt-baseline-debug.xml | 63 --------------- .../features/send/v2/common/ui/SendContent.kt | 14 ++-- .../features/send/v2/common/ui/TapHelp.kt | 6 +- .../send/v2/common/ui/state/ConfirmUM.kt | 2 +- .../DefaultSellRedirectDeepLinkHandler.kt | 4 +- .../DefaultSendEntryPointComponent.kt | 5 +- .../entrypoint/model/SendEntryPointModel.kt | 4 +- .../model/FeeSelectorAlertFactory.kt | 18 ++--- .../v2/feeselector/model/FeeSelectorModel.kt | 6 +- .../FeeSelectorCustomFieldConverter.kt | 6 +- ...eeSelectorCustomValueChangedTransformer.kt | 7 +- .../feeselector/ui/FeeSelectorBlockContent.kt | 13 ++-- .../ui/FeeSelectorModalBottomSheet.kt | 10 +-- .../v2/send/analytics/SendAnalyticEvents.kt | 6 +- .../v2/send/analytics/SendAnalyticHelper.kt | 6 +- .../v2/send/confirm/model/SendConfirmModel.kt | 24 +++--- .../SendConfirmInitialStateTransformer.kt | 2 +- .../v2/send/confirm/ui/SendConfirmContent.kt | 2 +- .../features/send/v2/send/model/SendModel.kt | 10 +-- .../success/ui/SendConfirmSuccessContent.kt | 6 +- .../analytics/NFTSendAnalyticEvents.kt | 6 +- .../analytics/NFTSendAnalyticHelper.kt | 2 +- .../confirm/model/NFTSendConfirmModel.kt | 26 +++---- .../NFTSendConfirmInitialStateTransformer.kt | 2 +- .../confirm/ui/NFTSendConfirmContent.kt | 2 +- .../success/ui/NFTSendSuccessContent.kt | 6 +- .../amount/model/SendAmountModel.kt | 17 ++-- .../SendDestinationAnalyticEvents.kt | 2 +- .../destination/model/SendDestinationModel.kt | 20 ++--- .../SendRecipientHistoryListConverter.kt | 4 +- .../SendRecipientWalletListConverter.kt | 8 +- .../model/transformers/RecentListUtils.kt | 8 +- ...dDestinationValidationResultTransformer.kt | 4 +- .../destination/ui/SendDestinationContent.kt | 77 ++++++++++--------- .../bitcoin/BitcoinCustomFeeConverter.kt | 2 +- .../ethereum/EthereumCustomFeeConverter.kt | 28 +++++-- .../custom/kaspa/KaspaCustomFeeConverter.kt | 9 ++- .../analytics/NotificationsAnalyticEvents.kt | 2 +- ...firmationNotificationsTransformerV2Test.kt | 2 +- ...firmationNotificationsTransformerV2Test.kt | 2 +- .../model/WcSendTransactionModel.kt | 2 +- 53 files changed, 219 insertions(+), 276 deletions(-) delete mode 100644 features/send-v2/api/detekt-baseline-debug.xml delete mode 100644 features/send-v2/impl/detekt-baseline-debug.xml diff --git a/common/ui/detekt-baseline-debug.xml b/common/ui/detekt-baseline-debug.xml index 76624db4ad..13ac4c3486 100644 --- a/common/ui/detekt-baseline-debug.xml +++ b/common/ui/detekt-baseline-debug.xml @@ -18,9 +18,7 @@ CanBeNonNullable:NotificationsFactory.kt$NotificationsFactory$minimumSendAmount: BigDecimal? CanBeNonNullable:NotificationsFactory.kt$NotificationsFactory$rentWarning: CryptoCurrencyWarning.Rent? MultilineLambdaItParameter:ExpressStatusItems.kt${ val itemInfo = expressTxs[it].info val (iconRes, tint) = when (itemInfo.iconState) { ExpressTransactionStateIconUM.Warning -> { R.drawable.ic_alert_triangle_20 to TangemTheme.colors.icon.attention } ExpressTransactionStateIconUM.Error -> { R.drawable.ic_alert_circle_24 to TangemTheme.colors.icon.warning } ExpressTransactionStateIconUM.None -> null to null } ExpressStatusItem( title = itemInfo.title, fromTokenIconState = itemInfo.fromCurrencyIcon, toTokenIconState = itemInfo.toCurrencyIcon, fromAmount = itemInfo.fromAmount, fromSymbol = itemInfo.fromAmountSymbol, toAmount = itemInfo.toAmount, toSymbol = itemInfo.toAmountSymbol, onClick = itemInfo.onClick, infoIconRes = iconRes, infoIconTint = tint, modifier = modifier.animateItem(), ) } - MultilineLambdaItParameter:TokenItemStateConverter.kt$TokenItemStateConverter${ createTitleState(it, yieldModuleApyMap, stakingApyMap, { onApyLabelClick?.invoke(it) }) } MultilineLambdaItParameter:TokenItemStateConverter.kt$TokenItemStateConverter.Companion${ it.key.equals( other = token.yieldSupplyKey(), ignoreCase = BlockchainUtils.isCaseInsensitiveContractAddress(token.network.rawId), ) } - NamedArguments:TokenItemStateConverter.kt$TokenItemStateConverter$createTitleState(it, yieldModuleApyMap, stakingApyMap, { onApyLabelClick?.invoke(it) }) NoNameShadowing:NavigationButtonsBlock.kt$navigationUM NoNameShadowing:UserWalletItem.kt$balance NullableBooleanCheck:TokenItemStateConverter.kt$TokenItemStateConverter.Companion$cryptoCurrencyStatus.value.yieldSupplyStatus?.isActive ?: false diff --git a/data/nft/detekt-baseline-debug.xml b/data/nft/detekt-baseline-debug.xml index 08a3e3aba8..d4e81aea8d 100644 --- a/data/nft/detekt-baseline-debug.xml +++ b/data/nft/detekt-baseline-debug.xml @@ -3,7 +3,6 @@ MultilineLambdaItParameter:DefaultNFTRepository.kt$DefaultNFTRepository${ NFTCollections( network = network, content = NFTCollections.Content.Collections( collections = it ?.map { collection -> nftSdkCollectionConverter.convert(network to collection) } ?.filter { it.id !is NFTCollection.Identifier.Unknown }, source = StatusSource.CACHE, ), ) } - MultilineLambdaItParameter:DefaultNFTRepository.kt$DefaultNFTRepository${ getNFTPersistenceStore(userWalletId, it).clear() getNFTRuntimeStore(userWalletId, it).clear() } MultilineLambdaItParameter:DefaultNFTRepository.kt$DefaultNFTRepository${ if (it !is UnsupportedOperationException) { saveFailedStateInRuntime( userWalletId = userWalletId, network = network, error = it, ) } } MultilineLambdaItParameter:DefaultNFTRepository.kt$DefaultNFTRepository${ if (it.id == collectionId) { it.changeAssetsStatusSource(source) } else { it } } MultilineLambdaItParameter:DefaultNFTRepository.kt$DefaultNFTRepository${ if (it.identifier == sdkCollectionId) { it.copy(assets = assets) } else { it } } diff --git a/data/visa/detekt-baseline-debug.xml b/data/visa/detekt-baseline-debug.xml index 96bb302f53..d9da47d03d 100644 --- a/data/visa/detekt-baseline-debug.xml +++ b/data/visa/detekt-baseline-debug.xml @@ -14,7 +14,6 @@ NullCheckOnMutableProperty:VisaLibLoader.kt$VisaLibLoader$if (config != null) return@withLock requireNotNull(config) NullCheckOnMutableProperty:VisaLibLoader.kt$VisaLibLoader$if (provider != null) return@withLock requireNotNull(provider) NullableToStringCall:DefaultOnboardingRepository.kt$DefaultOnboardingRepository$${error.message} - NullableToStringCall:TangemPayRequestPerformer.kt$TangemPayRequestPerformer$${error.message} RedundantSuspendModifier:DefaultVisaRepository.kt$DefaultVisaRepository$suspend SuspendFunSwallowedCancellation:DefaultVisaRepository.kt$DefaultVisaRepository$runCatching SuspendFunSwallowedCancellation:VisaApiRequestMaker.kt$VisaApiRequestMaker$runCatching diff --git a/data/wallet-connect/detekt-baseline-debug.xml b/data/wallet-connect/detekt-baseline-debug.xml index 6d06073a70..f357361c71 100644 --- a/data/wallet-connect/detekt-baseline-debug.xml +++ b/data/wallet-connect/detekt-baseline-debug.xml @@ -47,7 +47,6 @@ SuspendFunSwallowedCancellation:DefaultWcPairUseCase.kt$DefaultWcPairUseCase$runCatching UseAnyOrNoneInsteadOfFind:DefaultWcSessionsManager.kt$DefaultWcSessionsManager$find { it.sdkModel.topic == dto.topic } UseEmptyCounterpart:AssociateNetworksDelegate.kt$AssociateNetworksDelegate.Companion$listOf() - UseEmptyCounterpart:DefaultWcRequestService.kt$DefaultWcRequestService$setOf() UseEmptyCounterpart:WcAppMetaDataConverter.kt$WcAppMetaDataConverter$listOf() UseEmptyCounterpart:WcNetworksConverter.kt$WcNetworksConverter$listOf() UseEmptyCounterpart:WcSdkSessionConverter.kt$WcSdkSessionConverter$listOf() diff --git a/detekt_baseline_report.txt b/detekt_baseline_report.txt index aed69f1e1f..d2f8545c7e 100644 --- a/detekt_baseline_report.txt +++ b/detekt_baseline_report.txt @@ -1,7 +1,7 @@ ========================================== Detekt Baseline Updater & Issue Counter ========================================== -Date: 2025-12-04 17:37:53 +Date: 2025-12-08 12:25:24 Step 1: Running detekt to check for new issues... @@ -17,13 +17,13 @@ Counting issues in baseline files... ========================================== Summary: - Total Issues: 1380 - Modules with Issues: 50 + Total Issues: 1311 + Modules with Issues: 48 Average Issues per Module: 27 Progress: - Fixed: 422 out of 1802 (23%) - Remaining: 1380 + Fixed: 491 out of 1802 (27%) + Remaining: 1311 ========================================== All Modules with Issues (sorted by count) @@ -35,9 +35,8 @@ features/markets/impl 148 features/wallet/impl 145 features/onboarding-v2/impl 130 features/swap/impl 67 -features/send-v2/impl 57 -data/wallet-connect 55 -features/hot-wallet/impl 53 +data/wallet-connect 54 +features/hot-wallet/impl 51 features/walletconnect/impl 47 features/tokendetails/impl 46 features/staking/impl 46 @@ -47,13 +46,13 @@ domain/wallets 37 features/nft/impl 34 features/tester/impl 30 core/ui 27 -common/ui 26 features/swap/domain 25 domain/tokens 25 -data/visa 22 +common/ui 24 features/yield-supply/impl 21 features/tangempay/details/impl 21 -data/nft 20 +data/visa 21 +data/nft 19 features/swap/data 15 data/wallets 13 data/swap 13 @@ -73,7 +72,6 @@ libs/tangem-sdk-api 7 data/txhistory 7 features/welcome/impl 6 libs/visa 5 -features/send-v2/api 5 features/home/impl 5 domain/markets 5 data/account 5 diff --git a/features/hot-wallet/impl/detekt-baseline-debug.xml b/features/hot-wallet/impl/detekt-baseline-debug.xml index f34cb27c7f..2e3bf90a57 100644 --- a/features/hot-wallet/impl/detekt-baseline-debug.xml +++ b/features/hot-wallet/impl/detekt-baseline-debug.xml @@ -11,7 +11,6 @@ BooleanPropertyNaming:ForgetWalletUM.kt$ForgetWalletUM$val secondCheckboxChecked: Boolean BooleanPropertyNaming:HotAccessCodeRequestUM.kt$HotAccessCodeRequestUM$val useBiometricVisible: Boolean = true BooleanPropertyNaming:HotWalletStepperComponent.kt$HotWalletStepperComponent.StepperUM$val showBackButton: Boolean - BooleanPropertyNaming:HotWalletStepperComponent.kt$HotWalletStepperComponent.StepperUM$val showFeedbackButton: Boolean BooleanPropertyNaming:HotWalletStepperComponent.kt$HotWalletStepperComponent.StepperUM$val showSkipButton: Boolean BooleanPropertyNaming:ManualBackupCheckUM.kt$ManualBackupCheckUM$val completeButtonEnabled: Boolean BooleanPropertyNaming:ManualBackupCheckUM.kt$ManualBackupCheckUM$val completeButtonProgress: Boolean @@ -51,7 +50,6 @@ PropertyUsedBeforeDeclaration:AddExistingWalletImportModel.kt$AddExistingWalletImportModel$uiState ReusedModifierInstance:AddExistingWalletImportContent.kt$OutlineTextFieldWithIcon( modifier = modifier .padding(horizontal = 16.dp) .fillMaxWidth(), value = state.passPhrase, onValueChange = state.passPhraseChange, iconResId = R.drawable.ic_information_24, iconColor = TangemTheme.colors.icon.informative, label = stringResourceSafe(id = R.string.common_passphrase), placeholder = stringResourceSafe(id = R.string.send_optional_field), onIconClick = state.onPassphraseInfoClick, keyboardOptions = KeyboardOptions( autoCorrectEnabled = false, keyboardType = KeyboardType.Password, ), ) ReusedModifierInstance:HotAccessCodeRequestFullScreenContent.kt$AnimatedVisibility( modifier = modifier, visible = state.isShown, enter = fadeIn(), exit = fadeOut(), ) { Column( Modifier .fillMaxSize() .background(TangemTheme.colors.background.primary), horizontalAlignment = Alignment.CenterHorizontally, ) { TangemTopAppBar( modifier = Modifier.statusBarsPadding(), startButton = TopAppBarButtonUM.Back(state.onDismiss), ) SpacerH(68.dp) Column( Modifier .weight(1f) .fillMaxWidth() .padding(horizontal = 24.dp), horizontalAlignment = Alignment.CenterHorizontally, ) { Text( modifier = Modifier.animateEnterExit( enter = slideInVertically( tween(), initialOffsetY = { it + 200 }, ) + fadeIn(tween()), exit = slideOutVertically(tween(300)) { it - 200 } + fadeOut(tween()), ), text = stringResourceSafe(R.string.access_code_check_title), style = TangemTheme.typography.h2, color = TangemTheme.colors.text.primary1, ) SpacerH24() PinTextField( modifier = Modifier.animateEnterExit( enter = slideInVertically( tween(), initialOffsetY = { it + 200 }, ) + fadeIn(tween()), exit = slideOutVertically(tween(300)) { it - 200 } + fadeOut(tween()), ), length = 6, isPasswordVisual = true, value = state.accessCode, pinTextColor = state.accessCodeColor, onValueChange = state.onAccessCodeChange, ) SpacerH(20.dp) AnimatedVisibility( modifier = Modifier.animateEnterExit( enter = slideInVertically( tween(), initialOffsetY = { it + 200 }, ) + fadeIn(tween()), exit = slideOutVertically(tween(300)) { it - 200 } + fadeOut(tween()), ), visible = state.wrongAccessCodeText != null, enter = fadeIn(), exit = fadeOut(), ) { val wrongAccessCodeText = state.wrongAccessCodeText ?: return@AnimatedVisibility Text( text = wrongAccessCodeText.resolveReference(), textAlign = TextAlign.Center, style = TangemTheme.typography.caption2.copy( lineBreak = LineBreak.Heading, ), color = TangemTheme.colors.text.warning, ) } } AnimatedVisibility( visible = state.useBiometricVisible, enter = fadeIn(), exit = fadeOut(), ) { SecondaryButton( modifier = Modifier .padding(16.dp) .fillMaxWidth() .navigationBarsPadding() .imePadding(), text = stringResourceSafe( id = R.string.welcome_unlock, stringResourceSafe(R.string.common_biometrics), ), onClick = state.useBiometricClick, ) } } } - ReusedModifierInstance:HotWalletStepper.kt$TangemTopAppBar( startButton = if (state.showBackButton) { TopAppBarButtonUM.Back(onBackClick) } else { null }, endButton = when { state.showSkipButton -> TopAppBarButtonUM.Text( text = resourceReference(R.string.common_skip), onClicked = onSkipClick, ) state.showFeedbackButton -> TopAppBarButtonUM.Icon( iconRes = R.drawable.ic_chat_24, onClicked = onFeedbackClick, ) else -> null }, title = state.title, containerColor = TangemTheme.colors.background.primary, modifier = modifier, titleAlignment = Alignment.CenterHorizontally, ) SuspendFunSwallowedCancellation:AddExistingWalletImportModel.kt$AddExistingWalletImportModel$runCatching SuspendFunSwallowedCancellation:ManualBackupCheckModel.kt$ManualBackupCheckModel$runCatching SuspendFunSwallowedCancellation:ManualBackupPhraseModel.kt$ManualBackupPhraseModel$runCatching diff --git a/features/send-v2/api/detekt-baseline-debug.xml b/features/send-v2/api/detekt-baseline-debug.xml deleted file mode 100644 index 31859862c5..0000000000 --- a/features/send-v2/api/detekt-baseline-debug.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - BooleanPropertyNaming:FeeSelectorData.kt$FeeSelectorData$val removeSuggestedFee: Boolean = false - BooleanPropertyNaming:SendEntryRoute.kt$SendEntryRoute.ChooseToken$val showSendViaSwapNotification: Boolean - UseEmptyCounterpart:CommonSendAmountAnalyticEvents.kt$CommonSendAmountAnalyticEvents$mapOf() - UseEmptyCounterpart:CommonSendAnalyticEvents.kt$CommonSendAnalyticEvents$mapOf() - UseEmptyCounterpart:CommonSendFeeAnalyticEvents.kt$CommonSendFeeAnalyticEvents$mapOf() - - diff --git a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/analytics/CommonSendAnalyticEvents.kt b/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/analytics/CommonSendAnalyticEvents.kt index 799c657659..cb58f30134 100644 --- a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/analytics/CommonSendAnalyticEvents.kt +++ b/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/analytics/CommonSendAnalyticEvents.kt @@ -12,7 +12,7 @@ import com.tangem.core.analytics.models.AnalyticsParam.Key.TOKEN_PARAM sealed class CommonSendAnalyticEvents( category: String, event: String, - params: Map = mapOf(), + params: Map = emptyMap(), ) : AnalyticsEvent(category = category, event = event, params = params) { /** Recipient address screen opened */ diff --git a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/entry/SendEntryRoute.kt b/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/entry/SendEntryRoute.kt index 2fab40cdc0..ae701c2f99 100644 --- a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/entry/SendEntryRoute.kt +++ b/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/entry/SendEntryRoute.kt @@ -13,6 +13,6 @@ sealed class SendEntryRoute : Route { data object SendWithSwap : SendEntryRoute() /** Route to choose token screen for send via swap */ data class ChooseToken( - val showSendViaSwapNotification: Boolean, + val isShowSendViaSwapNotification: Boolean, ) : SendEntryRoute() } \ No newline at end of file diff --git a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/amount/analytics/CommonSendAmountAnalyticEvents.kt b/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/amount/analytics/CommonSendAmountAnalyticEvents.kt index 5cc038b0cb..cfc6409387 100644 --- a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/amount/analytics/CommonSendAmountAnalyticEvents.kt +++ b/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/amount/analytics/CommonSendAmountAnalyticEvents.kt @@ -10,7 +10,7 @@ import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents sealed class CommonSendAmountAnalyticEvents( category: String, event: String, - params: Map = mapOf(), + params: Map = emptyMap(), ) : AnalyticsEvent(category = category, event = event, params = params) { /** Selected currency */ diff --git a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/feeSelector/analytics/CommonSendFeeAnalyticEvents.kt b/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/feeSelector/analytics/CommonSendFeeAnalyticEvents.kt index 500e8b4f69..7294b5e0b8 100644 --- a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/feeSelector/analytics/CommonSendFeeAnalyticEvents.kt +++ b/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/feeSelector/analytics/CommonSendFeeAnalyticEvents.kt @@ -9,7 +9,7 @@ import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents.Common sealed class CommonSendFeeAnalyticEvents( category: String, event: String, - params: Map = mapOf(), + params: Map = emptyMap(), ) : AnalyticsEvent(category = category, event = event, params = params) { abstract val categoryName: String diff --git a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/feeSelector/entity/FeeSelectorData.kt b/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/feeSelector/entity/FeeSelectorData.kt index 66fa5e4156..be6f6de2bb 100644 --- a/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/feeSelector/entity/FeeSelectorData.kt +++ b/features/send-v2/api/src/main/java/com/tangem/features/send/v2/api/subcomponents/feeSelector/entity/FeeSelectorData.kt @@ -1,5 +1,5 @@ package com.tangem.features.send.v2.api.subcomponents.feeSelector.entity data class FeeSelectorData( - val removeSuggestedFee: Boolean = false, + val isRemoveSuggestedFee: Boolean = false, ) \ No newline at end of file diff --git a/features/send-v2/impl/detekt-baseline-debug.xml b/features/send-v2/impl/detekt-baseline-debug.xml deleted file mode 100644 index 5c064c3c41..0000000000 --- a/features/send-v2/impl/detekt-baseline-debug.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - BooleanPropertyNaming:ConfirmUM.kt$ConfirmUM.Content$val showTapHelp: Boolean - BooleanPropertyNaming:FeeSelectorAlertFactory.kt$FeeSelectorAlertFactory$val showFeeTooHigh = checkAndShowFeeTooHigh(feeSelectorUM, onConfirmClick) - BooleanPropertyNaming:FeeSelectorAlertFactory.kt$FeeSelectorAlertFactory$val showFeeTooLow = checkAndShowFeeTooLow(feeSelectorUM, onConfirmClick) - BooleanPropertyNaming:FeeSelectorModalBottomSheet.kt$val lastItem = index == state.feeItems.size - 1 - BooleanPropertyNaming:FeeSelectorModalBottomSheet.kt$val showDivider = index != customFeeFields.size - 1 || nonce is FeeNonce.Nonce - BooleanPropertyNaming:NFTSendAnalyticEvents.kt$NFTSendAnalyticEvents.TransactionScreenOpened$val nonceNotEmpty: Boolean - BooleanPropertyNaming:NFTSendSuccessContent.kt$var visible by remember { mutableStateOf(false) } - BooleanPropertyNaming:SendAnalyticEvents.kt$SendAnalyticEvents.TransactionScreenOpened$val nonceNotEmpty: Boolean - BooleanPropertyNaming:SendAnalyticHelper.kt$SendAnalyticHelper$val blockchainAddressForEns = (sendUM.destinationUM as? DestinationUM.Content)?.addressTextField?.isAddressEns - BooleanPropertyNaming:SendConfirmSuccessContent.kt$var visible by remember { mutableStateOf(false) } - BooleanPropertyNaming:SendEntryPointModel.kt$SendEntryPointModel$val showSendViaSwapNotification = shouldShowNotificationUseCase( NotificationId.SendViaSwapTokenSelectorNotification.key, ) - BooleanPropertyNaming:SendRecipientHistoryListConverter.kt$SendRecipientHistoryListConverter$val notZero = !item.amount.isZero() - BooleanPropertyNaming:TapHelp.kt$var wrappedIsDisplay by remember { mutableStateOf(false) } - CanBeNonNullable:SendDestinationContent.kt$memoField: DestinationTextFieldUM.RecipientMemo? - CanBeNonNullable:SendDestinationModel.kt$SendDestinationModel$type: EnterAddressSource? - MaxChainedCallsOnSameLine:FeeSelectorBlockContent.kt$state.selectedFeeItem.fee.amount.value.format { crypto( symbol = state.selectedFeeItem.fee.amount.currencySymbol, decimals = state.selectedFeeItem.fee.amount.decimals, ).fee(canBeLower = state.feeExtraInfo.isFeeApproximate) } - MultilineLambdaItParameter:DefaultSellRedirectDeepLinkHandler.kt$DefaultSellRedirectDeepLinkHandler${ Timber.e("Error on getting cryptoCurrency: $it") return@launch } - MultilineLambdaItParameter:FeeSelectorCustomFieldConverter.kt$FeeSelectorCustomFieldConverter${ when (it) { is Fee.Kaspa -> kaspaCustomFeeConverter.tryAutoFixValue( minimumFee = it, customValues = customValues, ) else -> customValues } } - MultilineLambdaItParameter:FeeSelectorModel.kt$FeeSelectorModel${ feeSelectorAlertFactory.getFeeUpdatedAlert( newFee = it, feeSelectorUM = uiState.value, proceedAction = { modelScope.launch { feeSelectorCheckReloadTrigger.callbackCheckResult(true) } }, stopAction = { modelScope.launch { feeSelectorCheckReloadTrigger.callbackCheckResult(false) } }, ) } - MultilineLambdaItParameter:KaspaCustomFeeConverter.kt$KaspaCustomFeeConverter${ val valueDecimal = it.value.parseToBigDecimal(it.decimals) // krc-20 transaction will be failed if custom fee value is less than minimum, // so we set value to minimum in this case if (valueDecimal < minimumFee.amount.value) { val fixedValue = minimumFeeAmountValue.parseBigDecimal(it.decimals) set( FEE_AMOUNT_INDEX, it.copy( value = fixedValue, label = getFiatReference( rate = currencyStatus.fiatRate, value = valueDecimal, appCurrency = appCurrency, ), ), ) } } - MultilineLambdaItParameter:NFTSendConfirmModel.kt$NFTSendConfirmModel${ it.copy( confirmUM = NFTSendConfirmInitialStateTransformer( isShowTapHelp = isShowTapHelp, walletName = stringReference(userWallet.name), ).transform(uiState.value.confirmUM), ) } - MultilineLambdaItParameter:NFTSendConfirmModel.kt$NFTSendConfirmModel${ it.copy( confirmUM = NFTSendConfirmationNotificationsTransformerV2( feeSelectorUM = uiState.value.feeSelectorUM, analyticsEventHandler = analyticsEventHandler, cryptoCurrency = cryptoCurrencyStatus.currency, appCurrency = params.appCurrency, analyticsCategoryName = analyticsCategoryName, ).transform(uiState.value.confirmUM), ) } - MultilineLambdaItParameter:NFTSendConfirmModel.kt$NFTSendConfirmModel${ val confirmUM = it.confirmUM as? ConfirmUM.Content it.copy(confirmUM = confirmUM?.copy(showTapHelp = showTapHelp) ?: it.confirmUM) } - MultilineLambdaItParameter:NFTSendConfirmModel.kt$NFTSendConfirmModel${ val isFeeNotNull = it.feeSelectorUM is FeeSelectorUMRedesigned.Content it.copy( confirmUM = (it.confirmUM as? ConfirmUM.Content)?.copy( isPrimaryButtonEnabled = !hasError && isFeeNotNull, ) ?: it.confirmUM, ) } - MultilineLambdaItParameter:RecentListUtils.kt${ add( DestinationRecipientListUM( id = "$tag$it", isLoading = false, isVisible = false, ), ) } - MultilineLambdaItParameter:RecentListUtils.kt${ add( DestinationRecipientListUM( id = "$tag$it", isLoading = true, ), ) } - MultilineLambdaItParameter:SendAmountModel.kt$SendAmountModel${ (it as? AmountState.Data)?.copy( isPrimaryButtonEnabled = false, ) ?: it } - MultilineLambdaItParameter:SendAmountModel.kt$SendAmountModel${ EnterAmountBoundary( amount = it, fiatRate = cryptoCurrencyStatus.value.fiatRate.orZero(), ) } - MultilineLambdaItParameter:SendConfirmModel.kt$SendConfirmModel${ it.copy( confirmUM = SendConfirmInitialStateTransformer( isShowTapHelp = isShowTapHelp, walletName = stringReference(userWallet.name), ).transform(uiState.value.confirmUM), confirmData = confirmData, ) } - MultilineLambdaItParameter:SendConfirmModel.kt$SendConfirmModel${ it.copy( confirmUM = SendConfirmationNotificationsTransformerV2( feeSelectorUM = uiState.value.feeSelectorUM, amountUM = uiState.value.amountUM, analyticsEventHandler = analyticsEventHandler, cryptoCurrency = cryptoCurrencyStatus.currency, appCurrency = appCurrency, analyticsCategoryName = params.analyticsCategoryName, ).transform(uiState.value.confirmUM), ) } - MultilineLambdaItParameter:SendConfirmModel.kt$SendConfirmModel${ val confirmUM = it.confirmUM as? ConfirmUM.Content it.copy(confirmUM = confirmUM?.copy(showTapHelp = showTapHelp) ?: it.confirmUM) } - MultilineLambdaItParameter:SendConfirmModel.kt$SendConfirmModel${ val feeUM = it.feeSelectorUM as? FeeSelectorUMRedesigned.Content it.copy( confirmUM = (it.confirmUM as? ConfirmUM.Content)?.copy( isPrimaryButtonEnabled = !hasError && feeUM != null, ) ?: it.confirmUM, ) } - MultilineLambdaItParameter:SendDestinationContent.kt${ if (it) { content() } else { Box(modifier = Modifier.fillMaxWidth()) } } - MultilineLambdaItParameter:SendDestinationModel.kt$SendDestinationModel${ analyticsEventHandler.send( SendDestinationAnalyticEvents.AddressEntered( categoryName = analyticsCategoryName, source = params.analyticsSendSource, method = it, isValid = addressValidationResult.isRight(), ), ) } - MultilineLambdaItParameter:SendDestinationModel.kt$SendDestinationModel${ if (it.network.rawId == cryptoCurrencyNetwork.rawId) { getNetworkAddressesUseCase.invokeSync( userWalletId = wallet.walletId, networkRawId = it.network.id.rawId, ) } else { null } } - MultilineLambdaItParameter:SendDestinationValidationResultTransformer.kt$SendDestinationValidationResultTransformer${ when (it) { is AddressValidation.Error.DataError, AddressValidation.Error.InvalidAddress, -> R.string.send_recipient_address_error AddressValidation.Error.AddressInWallet -> R.string.send_error_address_same_as_wallet } } - MultilineLambdaItParameter:SendModel.kt$SendModel${ Timber.w(it.toString()) showAlertError() return@launch } - MultilineLambdaItParameter:SendModel.kt$SendModel${ it.copy( destinationUM = SendDestinationInitialStateTransformer( cryptoCurrency = cryptoCurrency, ).transform(DestinationUM.Empty()), feeSelectorUM = FeeSelectorUM.Loading, confirmUM = ConfirmUM.Empty, confirmData = null, navigationUM = NavigationUM.Empty, ) } - MultilineLambdaItParameter:SendRecipientWalletListConverter.kt$SendRecipientWalletListConverter${ val isCoin = it.cryptoCurrency is CryptoCurrency.Coin val isNotSameAddress = it.address != senderAddress val isNotBlankAddress = it.address.isNotBlank() isNotBlankAddress && isCoin && (isNotSameAddress || isSelfSendAvailable) } - NamedArguments:EthereumCustomFeeConverter.kt$EthereumCustomFeeConverter$onValueChange(feeValue, customValues, index, value) - NamedArguments:FeeSelectorCustomValueChangedTransformer.kt$FeeSelectorCustomValueChangedTransformer$onValueChange(state, customFee.customValues, index, value) - NestedScopeFunctions:KaspaCustomFeeConverter.kt$KaspaCustomFeeConverter$let { val valueDecimal = it.value.parseToBigDecimal(it.decimals) // krc-20 transaction will be failed if custom fee value is less than minimum, // so we set value to minimum in this case if (valueDecimal < minimumFee.amount.value) { val fixedValue = minimumFeeAmountValue.parseBigDecimal(it.decimals) set( FEE_AMOUNT_INDEX, it.copy( value = fixedValue, label = getFiatReference( rate = currencyStatus.fiatRate, value = valueDecimal, appCurrency = appCurrency, ), ), ) } } - NoNameShadowing:FeeSelectorAlertFactory.kt$FeeSelectorAlertFactory$newFee - NoNameShadowing:SendContent.kt$navigationUM - NullCheckOnMutableProperty:SendAmountModel.kt$SendAmountModel$if (uiState.value is AmountState.Empty && userWallet != null) { val isOnlyOneWallet = getWalletsUseCase.invokeSync().size == 1 val walletTitle = if (isOnlyOneWallet) { resourceReference(R.string.send_from_title) } else { resourceReference( R.string.send_from_wallet_name, WrappedList(listOf(userWallet?.name.orEmpty())), // TODO AND-11440 ) } _uiState.update { AmountStateConverter( clickIntents = this, appCurrency = appCurrency, cryptoCurrencyStatus = cryptoCurrencyStatus, maxEnterAmount = maxAmountBoundary, iconStateConverter = CryptoCurrencyToIconStateConverter(), isBalanceHidden = params.isBalanceHidingFlow.value, accountTitleUM = AmountAccountConverter( isAccountsMode = isAccountsMode, walletTitle = walletTitle, prefixText = resourceReference(R.string.common_from), ).convert(account), ).convert( AmountParameters( title = walletTitle, value = "", ), ) } } - NullableToStringCall:BitcoinCustomFeeConverter.kt$BitcoinCustomFeeConverter$toSatoshiPerByte( amount = feeValue, decimals = value.amount.decimals, txSize = value.txSize, ).toString() - NullableToStringCall:NFTSendConfirmModel.kt$NFTSendConfirmModel$params.nftAsset.amount.toString() - ReusedModifierInstance:DefaultSendEntryPointComponent.kt$DefaultSendEntryPointComponent$Content(modifier.fillMaxSize()) - UnnecessaryLet:EthereumCustomFeeConverter.kt$EthereumCustomFeeConverter$let(::add) - UnnecessaryLet:EthereumCustomFeeConverter.kt$EthereumCustomFeeConverter$let(::addAll) - UnnecessaryLet:SendAmountModel.kt$SendAmountModel$let { onCurrencyChangeClick(isEnterInFiat) } - UseEmptyCounterpart:NFTSendAnalyticEvents.kt$NFTSendAnalyticEvents$mapOf() - UseEmptyCounterpart:NotificationsAnalyticEvents.kt$NotificationsAnalyticEvents$mapOf() - UseEmptyCounterpart:SendAnalyticEvents.kt$SendAnalyticEvents$mapOf() - UseEmptyCounterpart:SendDestinationAnalyticEvents.kt$SendDestinationAnalyticEvents$mapOf() - VarCouldBeVal:SendDestinationModel.kt$SendDestinationModel$private var validationJobHolder = JobHolder() - VarCouldBeVal:SendModel.kt$SendModel$private var balanceHidingJobHolder = JobHolder() - - diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/common/ui/SendContent.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/common/ui/SendContent.kt index cd6bfb3235..43924cbf0e 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/common/ui/SendContent.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/common/ui/SendContent.kt @@ -85,14 +85,14 @@ internal fun SendContent( @Composable private fun SendAppBar(navigationUM: NavigationUM) { - val navigationUM = navigationUM as? NavigationUM.Content ?: return + val navigationUMContent = navigationUM as? NavigationUM.Content ?: return AppBarWithBackButtonAndIcon( - text = navigationUM.title.resolveReference(), - subtitle = navigationUM.subtitle?.resolveReference(), - onBackClick = navigationUM.backIconClick, - onIconClick = navigationUM.additionalIconClick, - backIconRes = navigationUM.backIconRes, - iconRes = navigationUM.additionalIconRes, + text = navigationUMContent.title.resolveReference(), + subtitle = navigationUMContent.subtitle?.resolveReference(), + onBackClick = navigationUMContent.backIconClick, + onIconClick = navigationUMContent.additionalIconClick, + backIconRes = navigationUMContent.backIconRes, + iconRes = navigationUMContent.additionalIconRes, backgroundColor = TangemTheme.colors.background.tertiary, modifier = Modifier.height(TangemTheme.dimens.size56), ) diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/common/ui/TapHelp.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/common/ui/TapHelp.kt index 480650ee0e..43251bec2f 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/common/ui/TapHelp.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/common/ui/TapHelp.kt @@ -22,14 +22,14 @@ private const val TAP_HELP_ANIMATION_DELAY = 500L internal fun LazyListScope.tapHelp(isDisplay: Boolean, modifier: Modifier = Modifier) { item(key = TAP_HELP_KEY) { - var wrappedIsDisplay by remember { mutableStateOf(false) } + var isWrappedDisplay by remember { mutableStateOf(false) } LaunchedEffect(key1 = isDisplay) { delay(TAP_HELP_ANIMATION_DELAY) - wrappedIsDisplay = isDisplay + isWrappedDisplay = isDisplay } - if (wrappedIsDisplay) { + if (isWrappedDisplay) { Column( horizontalAlignment = Alignment.CenterHorizontally, modifier = modifier diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/common/ui/state/ConfirmUM.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/common/ui/state/ConfirmUM.kt index 78cc00c705..7a63af4176 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/common/ui/state/ConfirmUM.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/common/ui/state/ConfirmUM.kt @@ -14,7 +14,7 @@ internal sealed class ConfirmUM { override val isPrimaryButtonEnabled: Boolean = false, val walletName: TextReference, val isSending: Boolean, - val showTapHelp: Boolean, + val isShowTapHelp: Boolean, val sendingFooter: TextReference, val notifications: ImmutableList, ) : ConfirmUM() diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/deeplink/DefaultSellRedirectDeepLinkHandler.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/deeplink/DefaultSellRedirectDeepLinkHandler.kt index 825518011b..402cd981c5 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/deeplink/DefaultSellRedirectDeepLinkHandler.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/deeplink/DefaultSellRedirectDeepLinkHandler.kt @@ -51,8 +51,8 @@ internal class DefaultSellRedirectDeepLinkHandler @AssistedInject constructor( } scope.launch { - val cryptoCurrency = getCryptoCurrencyUseCase(userWallet, currencyId).getOrElse { - Timber.e("Error on getting cryptoCurrency: $it") + val cryptoCurrency = getCryptoCurrencyUseCase(userWallet, currencyId).getOrElse { error -> + Timber.e("Error on getting cryptoCurrency: $error") return@launch } // Convert using universal parser to account for regional separators diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/entrypoint/DefaultSendEntryPointComponent.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/entrypoint/DefaultSendEntryPointComponent.kt index b9f865983a..9e41df2a03 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/entrypoint/DefaultSendEntryPointComponent.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/entrypoint/DefaultSendEntryPointComponent.kt @@ -106,6 +106,7 @@ internal class DefaultSendEntryPointComponent @AssistedInject constructor( Children( stack = childStackValue, + modifier = modifier, animation = stackAnimation { child -> when (child.configuration) { SendEntryRoute.Send, @@ -115,7 +116,7 @@ internal class DefaultSendEntryPointComponent @AssistedInject constructor( } }, ) { child -> - child.instance.Content(modifier.fillMaxSize()) + child.instance.Content(Modifier.fillMaxSize()) } } @@ -125,7 +126,7 @@ internal class DefaultSendEntryPointComponent @AssistedInject constructor( ): ComposableContentComponent = when (configuration) { is SendEntryRoute.ChooseToken -> getManagedTokensComponent( componentContext = factoryContext, - showSendViaSwapNotification = configuration.showSendViaSwapNotification, + showSendViaSwapNotification = configuration.isShowSendViaSwapNotification, ) SendEntryRoute.Send -> sendComponent SendEntryRoute.SendWithSwap -> sendWithSwapComponent diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/entrypoint/model/SendEntryPointModel.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/entrypoint/model/SendEntryPointModel.kt index 02ba094907..f3ff4ee117 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/entrypoint/model/SendEntryPointModel.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/entrypoint/model/SendEntryPointModel.kt @@ -42,12 +42,12 @@ internal class SendEntryPointModel @Inject constructor( lastSavedAmount = lastAmount isEnterInFiat = isEnterInFiatSelected modelScope.launch { - val showSendViaSwapNotification = shouldShowNotificationUseCase( + val isShowSendViaSwapNotification = shouldShowNotificationUseCase( NotificationId.SendViaSwapTokenSelectorNotification.key, ) router.push( SendEntryRoute.ChooseToken( - showSendViaSwapNotification = showSendViaSwapNotification, + isShowSendViaSwapNotification = isShowSendViaSwapNotification, ), ) } diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/FeeSelectorAlertFactory.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/FeeSelectorAlertFactory.kt index 43091d08a1..6abebb0fb4 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/FeeSelectorAlertFactory.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/FeeSelectorAlertFactory.kt @@ -20,10 +20,10 @@ internal class FeeSelectorAlertFactory @Inject constructor( ) { fun checkAndShowAlerts(feeSelectorUM: FeeSelectorUM.Content, onConfirmClick: () -> Unit) { - val showFeeTooLow = checkAndShowFeeTooLow(feeSelectorUM, onConfirmClick) - val showFeeTooHigh = checkAndShowFeeTooHigh(feeSelectorUM, onConfirmClick) + val isShowFeeTooLow = checkAndShowFeeTooLow(feeSelectorUM, onConfirmClick) + val isShowFeeTooHigh = checkAndShowFeeTooHigh(feeSelectorUM, onConfirmClick) - if (!showFeeTooLow && !showFeeTooHigh) { + if (!isShowFeeTooLow && !isShowFeeTooHigh) { onConfirmClick() } } @@ -78,20 +78,20 @@ internal class FeeSelectorAlertFactory @Inject constructor( } fun getFeeUpdatedAlert( - newFee: TransactionFee, + newTransactionFee: TransactionFee, feeSelectorUM: FeeSelectorUM, proceedAction: () -> Unit, stopAction: () -> Unit, ) { if (feeSelectorUM !is FeeSelectorUM.Content) return - val newFee = when (newFee) { - is TransactionFee.Single -> newFee.normal + val newFee = when (newTransactionFee) { + is TransactionFee.Single -> newTransactionFee.normal is TransactionFee.Choosable -> { when (feeSelectorUM.selectedFeeItem) { is FeeItem.Suggested -> feeSelectorUM.selectedFeeItem.fee - is FeeItem.Slow -> newFee.minimum - is FeeItem.Market -> newFee.normal - is FeeItem.Fast -> newFee.priority + is FeeItem.Slow -> newTransactionFee.minimum + is FeeItem.Market -> newTransactionFee.normal + is FeeItem.Fast -> newTransactionFee.priority is FeeItem.Custom -> return } } diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/FeeSelectorModel.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/FeeSelectorModel.kt index ba91d7d75e..c290cc9fb3 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/FeeSelectorModel.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/FeeSelectorModel.kt @@ -197,7 +197,7 @@ internal class FeeSelectorModel @Inject constructor( private fun subscribeOnFeeReloadTriggerUpdates() { feeSelectorReloadListener.reloadTriggerFlow .onEach { data -> - if (data.removeSuggestedFee) { + if (data.isRemoveSuggestedFee) { uiState.update(FeeSelectorRemoveSuggestedTransformer) } loadFee() @@ -220,9 +220,9 @@ internal class FeeSelectorModel @Inject constructor( private fun checkLoadFee() { modelScope.launch { params.onLoadFee().fold( - ifRight = { + ifRight = { newFee -> feeSelectorAlertFactory.getFeeUpdatedAlert( - newFee = it, + newTransactionFee = newFee, feeSelectorUM = uiState.value, proceedAction = { modelScope.launch { diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeSelectorCustomFieldConverter.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeSelectorCustomFieldConverter.kt index 258312e8a0..344bb80387 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeSelectorCustomFieldConverter.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeSelectorCustomFieldConverter.kt @@ -107,10 +107,10 @@ internal class FeeSelectorCustomFieldConverter( when (val fees = feeSelectorState.fees) { is TransactionFee.Choosable -> fees.minimum is TransactionFee.Single -> fees.normal - }.let { - when (it) { + }.let { fee -> + when (fee) { is Fee.Kaspa -> kaspaCustomFeeConverter.tryAutoFixValue( - minimumFee = it, + minimumFee = fee, customValues = customValues, ) else -> customValues diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeSelectorCustomValueChangedTransformer.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeSelectorCustomValueChangedTransformer.kt index 9418304d3b..5e94e5a7c1 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeSelectorCustomValueChangedTransformer.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/model/transformers/FeeSelectorCustomValueChangedTransformer.kt @@ -27,7 +27,12 @@ internal class FeeSelectorCustomValueChangedTransformer( feeCryptoCurrencyStatus = feeCryptoCurrencyStatus, normalFee = state.selectedFeeItem.fee, ) - val updatedCustomValues = customFeeConverter.onValueChange(state, customFee.customValues, index, value) + val updatedCustomValues = customFeeConverter.onValueChange( + feeSelectorState = state, + customValues = customFee.customValues, + index = index, + value = value, + ) val newCustomFee = customFee.copy( fee = customFeeConverter.convertBack(updatedCustomValues), customValues = updatedCustomValues, diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/ui/FeeSelectorBlockContent.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/ui/FeeSelectorBlockContent.kt index 30dcb3c687..5eb28eda97 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/ui/FeeSelectorBlockContent.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/ui/FeeSelectorBlockContent.kt @@ -172,12 +172,13 @@ private fun FeeContent(state: FeeSelectorUM.Content, modifier: Modifier = Modifi approximate = state.feeExtraInfo.isFeeApproximate, ) } else { - state.selectedFeeItem.fee.amount.value.format { - crypto( - symbol = state.selectedFeeItem.fee.amount.currencySymbol, - decimals = state.selectedFeeItem.fee.amount.decimals, - ).fee(canBeLower = state.feeExtraInfo.isFeeApproximate) - } + state.selectedFeeItem.fee.amount.value + .format { + crypto( + symbol = state.selectedFeeItem.fee.amount.currencySymbol, + decimals = state.selectedFeeItem.fee.amount.decimals, + ).fee(canBeLower = state.feeExtraInfo.isFeeApproximate) + } }, style = TangemTheme.typography.body1, color = TangemTheme.colors.text.tertiary, diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/ui/FeeSelectorModalBottomSheet.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/ui/FeeSelectorModalBottomSheet.kt index 0027bda872..daa164aa95 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/ui/FeeSelectorModalBottomSheet.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/feeselector/ui/FeeSelectorModalBottomSheet.kt @@ -129,7 +129,7 @@ private fun FeeSelectorItems( val feeFiatRateUM = state.feeFiatRateUM state.feeItems.fastForEachIndexed { index, item -> val isSelected = item.isSameClass(state.selectedFeeItem) - val lastItem = index == state.feeItems.size - 1 + val isLastItem = index == state.feeItems.size - 1 val iconTint by animateColorAsState( targetValue = if (isSelected) TangemTheme.colors.icon.accent else TangemTheme.colors.text.tertiary, label = "Fee selector icon tint change", @@ -180,7 +180,7 @@ private fun FeeSelectorItems( null }, ellipsizeOffset = item.fee.amount.currencySymbol.length, - showDivider = !isSelected && !lastItem, + showDivider = !isSelected && !isLastItem, ) } } @@ -243,7 +243,7 @@ private fun ExpandedCustomFeeItems( ) { Column(modifier = modifier) { customFeeFields.fastForEachIndexed { index, field -> - val showDivider = index != customFeeFields.size - 1 || nonce is FeeNonce.Nonce + val isShowDivider = index != customFeeFields.size - 1 || nonce is FeeNonce.Nonce if (field.label != null) { InputRowEnterInfoAmountV2( text = field.value, @@ -256,7 +256,7 @@ private fun ExpandedCustomFeeItems( keyboardOptions = field.keyboardOptions, keyboardActions = field.keyboardActions, onValueChange = { onValueChange(index, it) }, - showDivider = showDivider, + showDivider = isShowDivider, isReadOnly = field.isReadonly, ) } else { @@ -270,7 +270,7 @@ private fun ExpandedCustomFeeItems( onValueChange = { onValueChange(index, it) }, keyboardOptions = field.keyboardOptions, keyboardActions = field.keyboardActions, - showDivider = showDivider, + showDivider = isShowDivider, ) } } diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/analytics/SendAnalyticEvents.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/analytics/SendAnalyticEvents.kt index 5774e3b776..bf26de5704 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/analytics/SendAnalyticEvents.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/analytics/SendAnalyticEvents.kt @@ -15,7 +15,7 @@ import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents */ internal sealed class SendAnalyticEvents( event: String, - params: Map = mapOf(), + params: Map = emptyMap(), ) : AnalyticsEvent(category = CommonSendAnalyticEvents.SEND_CATEGORY, event = event, params = params) { /** Transaction send screen opened */ @@ -23,7 +23,7 @@ internal sealed class SendAnalyticEvents( val token: String, val feeType: AnalyticsParam.FeeType, val blockchain: String, - val nonceNotEmpty: Boolean, + val isNonceNotEmpty: Boolean, private val ensStatus: AnalyticsParam.EmptyFull, ) : SendAnalyticEvents( event = "Transaction Sent Screen Opened", @@ -31,7 +31,7 @@ internal sealed class SendAnalyticEvents( TOKEN_PARAM to token, FEE_TYPE to feeType.value, BLOCKCHAIN to blockchain, - NONCE to nonceNotEmpty.toString().capitalize(), + NONCE to isNonceNotEmpty.toString().capitalize(), ENS_ADDRESS to when (ensStatus) { AnalyticsParam.EmptyFull.Empty -> false.toString().capitalize() AnalyticsParam.EmptyFull.Full -> true.toString().capitalize() diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/analytics/SendAnalyticHelper.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/analytics/SendAnalyticHelper.kt index 48f87023ed..4d56a5075f 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/analytics/SendAnalyticHelper.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/analytics/SendAnalyticHelper.kt @@ -26,7 +26,7 @@ internal class SendAnalyticHelper @Inject constructor( token = cryptoCurrency.symbol, feeType = feeType, blockchain = cryptoCurrency.network.name, - nonceNotEmpty = feeSelectorUM.feeNonce is FeeNonce.Nonce, + isNonceNotEmpty = feeSelectorUM.feeNonce is FeeNonce.Nonce, ensStatus = getEnsStatus(sendUM), ), ) @@ -54,9 +54,9 @@ internal class SendAnalyticHelper @Inject constructor( } private fun getEnsStatus(sendUM: SendUM): AnalyticsParam.EmptyFull { - val blockchainAddressForEns = + val isBlockchainAddressForEns = (sendUM.destinationUM as? DestinationUM.Content)?.addressTextField?.isAddressEns - return if (blockchainAddressForEns == true) { + return if (isBlockchainAddressForEns == true) { AnalyticsParam.EmptyFull.Full } else { AnalyticsParam.EmptyFull.Empty diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/model/SendConfirmModel.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/model/SendConfirmModel.kt index 5c00ee1e19..d36c18e827 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/model/SendConfirmModel.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/model/SendConfirmModel.kt @@ -306,8 +306,8 @@ internal class SendConfirmModel @Inject constructor( modelScope.launch { val isShowTapHelp = isSendTapHelpEnabledUseCase.invokeSync().getOrElse { false } if (confirmUM is ConfirmUM.Empty) { - _uiState.update { - it.copy( + _uiState.update { state -> + state.copy( confirmUM = SendConfirmInitialStateTransformer( isShowTapHelp = isShowTapHelp, walletName = stringReference(userWallet.name), @@ -323,9 +323,9 @@ internal class SendConfirmModel @Inject constructor( private fun subscribeOnTapHelpUpdates() { isSendTapHelpEnabledUseCase().getOrNull() ?.onEach { showTapHelp -> - _uiState.update { - val confirmUM = it.confirmUM as? ConfirmUM.Content - it.copy(confirmUM = confirmUM?.copy(showTapHelp = showTapHelp) ?: it.confirmUM) + _uiState.update { state -> + val confirmUM = state.confirmUM as? ConfirmUM.Content + state.copy(confirmUM = confirmUM?.copy(isShowTapHelp = showTapHelp) ?: state.confirmUM) } }?.launchIn(modelScope) } @@ -333,12 +333,12 @@ internal class SendConfirmModel @Inject constructor( private fun subscribeOnNotificationsUpdateTrigger() { notificationsUpdateListener.hasErrorFlow .onEach { hasError -> - _uiState.update { - val feeUM = it.feeSelectorUM as? FeeSelectorUMRedesigned.Content - it.copy( - confirmUM = (it.confirmUM as? ConfirmUM.Content)?.copy( + _uiState.update { state -> + val feeUM = state.feeSelectorUM as? FeeSelectorUMRedesigned.Content + state.copy( + confirmUM = (state.confirmUM as? ConfirmUM.Content)?.copy( isPrimaryButtonEnabled = !hasError && feeUM != null, - ) ?: it.confirmUM, + ) ?: state.confirmUM, ) } } @@ -495,8 +495,8 @@ internal class SendConfirmModel @Inject constructor( feeError = confirmData.feeError, ), ) - _uiState.update { - it.copy( + _uiState.update { state -> + state.copy( confirmUM = SendConfirmationNotificationsTransformerV2( feeSelectorUM = uiState.value.feeSelectorUM, amountUM = uiState.value.amountUM, diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/model/transformers/SendConfirmInitialStateTransformer.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/model/transformers/SendConfirmInitialStateTransformer.kt index 1231a4954e..bd50b38485 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/model/transformers/SendConfirmInitialStateTransformer.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/model/transformers/SendConfirmInitialStateTransformer.kt @@ -13,7 +13,7 @@ internal class SendConfirmInitialStateTransformer( return ConfirmUM.Content( walletName = walletName, isSending = false, - showTapHelp = isShowTapHelp, + isShowTapHelp = isShowTapHelp, sendingFooter = TextReference.EMPTY, notifications = persistentListOf(), ) diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/ui/SendConfirmContent.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/ui/SendConfirmContent.kt index d617e88182..cb97fc4632 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/ui/SendConfirmContent.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/ui/SendConfirmContent.kt @@ -52,7 +52,7 @@ internal fun SendConfirmContent( feeSelectorBlockComponent = feeSelectorBlockComponent, ) if (confirmUM != null) { - tapHelp(isDisplay = confirmUM.showTapHelp) + tapHelp(isDisplay = confirmUM.isShowTapHelp) with(notificationsComponent) { content( state = notificationsUM, diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/model/SendModel.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/model/SendModel.kt index 38c5c33abd..1028a207b5 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/model/SendModel.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/model/SendModel.kt @@ -147,7 +147,7 @@ internal class SendModel @Inject constructor( var appCurrency: AppCurrency = AppCurrency.Default var predefinedValues: PredefinedValues = PredefinedValues.Empty - private var balanceHidingJobHolder = JobHolder() + private val balanceHidingJobHolder = JobHolder() init { subscribeOnBalanceHidden() @@ -226,8 +226,8 @@ internal class SendModel @Inject constructor( } override fun resetSendNavigation() { - uiState.update { - it.copy( + uiState.update { state -> + state.copy( destinationUM = SendDestinationInitialStateTransformer( cryptoCurrency = cryptoCurrency, ).transform(DestinationUM.Empty()), @@ -358,8 +358,8 @@ internal class SendModel @Inject constructor( ) } }, - ifLeft = { - Timber.w(it.toString()) + ifLeft = { error -> + Timber.w(error.toString()) showAlertError() return@launch }, diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/success/ui/SendConfirmSuccessContent.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/success/ui/SendConfirmSuccessContent.kt index fbd5a692d6..7d07f291bd 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/success/ui/SendConfirmSuccessContent.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/success/ui/SendConfirmSuccessContent.kt @@ -29,17 +29,17 @@ import kotlinx.coroutines.delay @Composable internal fun SendConfirmSuccessContent(sendUM: SendUM, destinationBlockComponent: SendDestinationBlockComponent) { - var visible by remember { mutableStateOf(false) } + var isVisible by remember { mutableStateOf(false) } LaunchedEffect(Unit) { delay(ANIMATION_DELAY) - visible = true + isVisible = true } val height = ANIMATION_OFFSET.toPx().toInt() AnimatedVisibility( - visible = visible, + visible = isVisible, enter = slideInVertically( initialOffsetY = { height }, ).plus(fadeIn()), diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/analytics/NFTSendAnalyticEvents.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/analytics/NFTSendAnalyticEvents.kt index f542b5f217..25700edaa6 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/analytics/NFTSendAnalyticEvents.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/analytics/NFTSendAnalyticEvents.kt @@ -14,7 +14,7 @@ import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents */ internal sealed class NFTSendAnalyticEvents( event: String, - params: Map = mapOf(), + params: Map = emptyMap(), ) : AnalyticsEvent(category = CommonSendAnalyticEvents.NFT_SEND_CATEGORY, event = event, params = params) { /** Transaction send screen opened */ @@ -22,14 +22,14 @@ internal sealed class NFTSendAnalyticEvents( val token: String, val feeType: AnalyticsParam.FeeType, val blockchain: String, - val nonceNotEmpty: Boolean, + val isNonceNotEmpty: Boolean, ) : NFTSendAnalyticEvents( event = "NFT Sent Screen Opened", params = mapOf( TOKEN_PARAM to token, FEE_TYPE to feeType.value, BLOCKCHAIN to blockchain, - NONCE to nonceNotEmpty.toString().capitalize(), + NONCE to isNonceNotEmpty.toString().capitalize(), ), ) } \ No newline at end of file diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/analytics/NFTSendAnalyticHelper.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/analytics/NFTSendAnalyticHelper.kt index c25e1fc99a..bab316c20f 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/analytics/NFTSendAnalyticHelper.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/analytics/NFTSendAnalyticHelper.kt @@ -27,7 +27,7 @@ internal class NFTSendAnalyticHelper @Inject constructor( token = cryptoCurrency.symbol, feeType = feeType, blockchain = cryptoCurrency.network.name, - nonceNotEmpty = feeSelectorUM.feeNonce is FeeNonce.Nonce, + isNonceNotEmpty = feeSelectorUM.feeNonce is FeeNonce.Nonce, ), ) analyticsEventHandler.send( diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/model/NFTSendConfirmModel.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/model/NFTSendConfirmModel.kt index 1c7c92bc7e..8bab99a2a4 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/model/NFTSendConfirmModel.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/model/NFTSendConfirmModel.kt @@ -195,7 +195,7 @@ internal class NFTSendConfirmModel @Inject constructor( derivationPath = cryptoCurrency.network.derivationPath.value, destinationAddress = confirmData.enteredDestination.orEmpty(), tokenSymbol = null, - amount = params.nftAsset.amount.toString(), + amount = params.nftAsset.amount?.toString().orEmpty(), fee = confirmData.fee?.amount?.value?.stripZeroPlainString(), ), ) @@ -213,8 +213,8 @@ internal class NFTSendConfirmModel @Inject constructor( modelScope.launch { val isShowTapHelp = isSendTapHelpEnabledUseCase.invokeSync().getOrElse { false } if (confirmUM is ConfirmUM.Empty || isEmptyFee) { - _uiState.update { - it.copy( + _uiState.update { state -> + state.copy( confirmUM = NFTSendConfirmInitialStateTransformer( isShowTapHelp = isShowTapHelp, walletName = stringReference(userWallet.name), @@ -229,9 +229,9 @@ internal class NFTSendConfirmModel @Inject constructor( private fun subscribeOnTapHelpUpdates() { isSendTapHelpEnabledUseCase().getOrNull() ?.onEach { showTapHelp -> - _uiState.update { - val confirmUM = it.confirmUM as? ConfirmUM.Content - it.copy(confirmUM = confirmUM?.copy(showTapHelp = showTapHelp) ?: it.confirmUM) + _uiState.update { state -> + val confirmUM = state.confirmUM as? ConfirmUM.Content + state.copy(confirmUM = confirmUM?.copy(isShowTapHelp = showTapHelp) ?: state.confirmUM) } }?.launchIn(modelScope) } @@ -239,13 +239,13 @@ internal class NFTSendConfirmModel @Inject constructor( private fun subscribeOnNotificationsUpdateTrigger() { notificationsUpdateListener.hasErrorFlow .onEach { hasError -> - _uiState.update { - val isFeeNotNull = it.feeSelectorUM is FeeSelectorUMRedesigned.Content + _uiState.update { state -> + val isFeeNotNull = state.feeSelectorUM is FeeSelectorUMRedesigned.Content - it.copy( - confirmUM = (it.confirmUM as? ConfirmUM.Content)?.copy( + state.copy( + confirmUM = (state.confirmUM as? ConfirmUM.Content)?.copy( isPrimaryButtonEnabled = !hasError && isFeeNotNull, - ) ?: it.confirmUM, + ) ?: state.confirmUM, ) } } @@ -353,8 +353,8 @@ internal class NFTSendConfirmModel @Inject constructor( ), ) } - _uiState.update { - it.copy( + _uiState.update { state -> + state.copy( confirmUM = NFTSendConfirmationNotificationsTransformerV2( feeSelectorUM = uiState.value.feeSelectorUM, analyticsEventHandler = analyticsEventHandler, diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/model/transformers/NFTSendConfirmInitialStateTransformer.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/model/transformers/NFTSendConfirmInitialStateTransformer.kt index e7f383dbe3..de24a6a022 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/model/transformers/NFTSendConfirmInitialStateTransformer.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/model/transformers/NFTSendConfirmInitialStateTransformer.kt @@ -12,7 +12,7 @@ internal class NFTSendConfirmInitialStateTransformer( override fun transform(prevState: ConfirmUM): ConfirmUM { return ConfirmUM.Content( isSending = false, - showTapHelp = isShowTapHelp, + isShowTapHelp = isShowTapHelp, sendingFooter = TextReference.EMPTY, walletName = walletName, notifications = persistentListOf(), diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/ui/NFTSendConfirmContent.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/ui/NFTSendConfirmContent.kt index 3f93769f0e..c950a991ae 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/ui/NFTSendConfirmContent.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/confirm/ui/NFTSendConfirmContent.kt @@ -45,7 +45,7 @@ internal fun NFTSendConfirmContent( feeSelectorBlockComponent = feeSelectorBlockComponent, ) if (confirmUM != null) { - tapHelp(isDisplay = confirmUM.showTapHelp) + tapHelp(isDisplay = confirmUM.isShowTapHelp) with(notificationsComponent) { content( state = notificationsUM, diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/success/ui/NFTSendSuccessContent.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/success/ui/NFTSendSuccessContent.kt index c90b4429e3..b5e13f0e06 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/success/ui/NFTSendSuccessContent.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/sendnft/success/ui/NFTSendSuccessContent.kt @@ -34,17 +34,17 @@ internal fun NFTSendSuccessContent( nftDetailsBlockComponent: NFTDetailsBlockComponent, modifier: Modifier = Modifier, ) { - var visible by remember { mutableStateOf(false) } + var isVisible by remember { mutableStateOf(false) } LaunchedEffect(Unit) { delay(ANIMATION_DELAY) - visible = true + isVisible = true } val height = ANIMATION_OFFSET.toPx().toInt() AnimatedVisibility( - visible = visible, + visible = isVisible, enter = slideInVertically( initialOffsetY = { height }, ).plus(fadeIn()), diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/model/SendAmountModel.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/model/SendAmountModel.kt index 9be514d748..b232d081f9 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/model/SendAmountModel.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/model/SendAmountModel.kt @@ -155,9 +155,9 @@ internal class SendAmountModel @Inject constructor( minAmountBoundary = getMinimumTransactionAmountSyncUseCase( userWalletId = params.userWalletId, cryptoCurrencyStatus = cryptoCurrencyStatus, - ).getOrNull()?.let { + ).getOrNull()?.let { amount -> EnterAmountBoundary( - amount = it, + amount = amount, fiatRate = cryptoCurrencyStatus.value.fiatRate.orZero(), ) } @@ -183,6 +183,7 @@ internal class SendAmountModel @Inject constructor( account: Account.CryptoPortfolio?, isAccountsMode: Boolean, ) { + val userWallet = userWallet if (uiState.value is AmountState.Empty && userWallet != null) { val isOnlyOneWallet = getWalletsUseCase.invokeSync().size == 1 val walletTitle = if (isOnlyOneWallet) { @@ -190,7 +191,7 @@ internal class SendAmountModel @Inject constructor( } else { resourceReference( R.string.send_from_wallet_name, - WrappedList(listOf(userWallet?.name.orEmpty())), // TODO [REDACTED_TASK_KEY] + WrappedList(listOf(userWallet.name)), // TODO [REDACTED_TASK_KEY] ) } _uiState.update { @@ -297,10 +298,10 @@ internal class SendAmountModel @Inject constructor( private fun confirmConvertToToken() { val amountParams = params as? SendAmountComponentParams.AmountParams ?: return val amountFieldData = uiState.value as? AmountState.Data - _uiState.update { - (it as? AmountState.Data)?.copy( + _uiState.update { state -> + (state as? AmountState.Data)?.copy( isPrimaryButtonEnabled = false, - ) ?: it + ) ?: state } val isEnterInFiatSelected = amountFieldData?.amountTextField?.isFiatValue == true @@ -352,7 +353,9 @@ internal class SendAmountModel @Inject constructor( private fun subscribeOnAmountUpdateTriggerUpdates() { sendAmountUpdateListener.updateAmountTriggerFlow .onEach { (amount, isEnterInFiat) -> - isEnterInFiat?.let { onCurrencyChangeClick(isEnterInFiat) } + if (isEnterInFiat != null) { + onCurrencyChangeClick(isEnterInFiat) + } onAmountValueChange(amount) saveResult() }.launchIn(modelScope) diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/analytics/SendDestinationAnalyticEvents.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/analytics/SendDestinationAnalyticEvents.kt index 39191837d0..2907e373d7 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/analytics/SendDestinationAnalyticEvents.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/analytics/SendDestinationAnalyticEvents.kt @@ -8,7 +8,7 @@ import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents internal sealed class SendDestinationAnalyticEvents( category: String, event: String, - params: Map = mapOf(), + params: Map = emptyMap(), ) : AnalyticsEvent(category = category, event = event, params = params) { abstract val categoryName: String diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/SendDestinationModel.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/SendDestinationModel.kt index 5870afd0fb..ba2ab8f1b1 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/SendDestinationModel.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/SendDestinationModel.kt @@ -85,7 +85,7 @@ internal class SendDestinationModel @Inject constructor( private val senderAddresses = MutableStateFlow>(emptyList()) - private var validationJobHolder = JobHolder() + private val validationJobHolder = JobHolder() init { configDestinationNavigation() @@ -234,11 +234,11 @@ internal class SendDestinationModel @Inject constructor( .map { wallet -> async { val addresses = if (!wallet.isMultiCurrency) { - getCryptoCurrencyUseCase(wallet.walletId).getOrNull()?.let { - if (it.network.rawId == cryptoCurrencyNetwork.rawId) { + getCryptoCurrencyUseCase(wallet.walletId).getOrNull()?.let { cryptoCurrency -> + if (cryptoCurrency.network.rawId == cryptoCurrencyNetwork.rawId) { getNetworkAddressesUseCase.invokeSync( userWalletId = wallet.walletId, - networkRawId = it.network.id.rawId, + networkRawId = cryptoCurrency.network.id.rawId, ) } else { null @@ -323,12 +323,12 @@ internal class SendDestinationModel @Inject constructor( network = cryptoCurrency.network, ) - type?.let { + if (type != null) { analyticsEventHandler.send( SendDestinationAnalyticEvents.AddressEntered( categoryName = analyticsCategoryName, source = params.analyticsSendSource, - method = it, + method = type, isValid = addressValidationResult.isRight(), ), ) @@ -339,12 +339,14 @@ internal class SendDestinationModel @Inject constructor( memoValidationResult, ), ) - autoNextFromRecipient(type, addressValidationResult.isRight(), memoValidationResult.isRight()) + if (type != null) { + autoNextFromRecipient(type, addressValidationResult.isRight(), memoValidationResult.isRight()) + } }.saveIn(validationJobHolder) } - private fun autoNextFromRecipient(type: EnterAddressSource?, isValidAddress: Boolean, isValidMemo: Boolean) { - if (type?.isAutoNext == true && isValidAddress && isValidMemo) { + private fun autoNextFromRecipient(type: EnterAddressSource, isValidAddress: Boolean, isValidMemo: Boolean) { + if (type.isAutoNext && isValidAddress && isValidMemo) { saveResult() (params as? SendDestinationComponentParams.DestinationParams)?.callback?.onNextClick() } diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/converters/SendRecipientHistoryListConverter.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/converters/SendRecipientHistoryListConverter.kt index 1b9d4bcbc9..6b9979cbfa 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/converters/SendRecipientHistoryListConverter.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/converters/SendRecipientHistoryListConverter.kt @@ -39,8 +39,8 @@ internal class SendRecipientHistoryListConverter( } else { item.sourceType is TxInfo.SourceType.Single } - val notZero = !item.amount.isZero() - isTransfer && isSingleAddress && isNotContract && item.isOutgoing && notZero + val isNotZero = !item.amount.isZero() + isTransfer && isSingleAddress && isNotContract && item.isOutgoing && isNotZero } .take(RECENT_LIST_SIZE) .mapIndexed { index, tx -> diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/converters/SendRecipientWalletListConverter.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/converters/SendRecipientWalletListConverter.kt index 1e43755cbc..94223cd153 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/converters/SendRecipientWalletListConverter.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/converters/SendRecipientWalletListConverter.kt @@ -30,10 +30,10 @@ internal class SendRecipientWalletListConverter( var walletsCounter = 0 return this.filterNotNull() - .filter { - val isCoin = it.cryptoCurrency is CryptoCurrency.Coin - val isNotSameAddress = it.address != senderAddress - val isNotBlankAddress = it.address.isNotBlank() + .filter { destinationWallet -> + val isCoin = destinationWallet.cryptoCurrency is CryptoCurrency.Coin + val isNotSameAddress = destinationWallet.address != senderAddress + val isNotBlankAddress = destinationWallet.address.isNotBlank() isNotBlankAddress && isCoin && (isNotSameAddress || isSelfSendAvailable) } diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/RecentListUtils.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/RecentListUtils.kt index ad2e643f1e..638d7abede 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/RecentListUtils.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/RecentListUtils.kt @@ -9,10 +9,10 @@ internal const val WALLET_KEY_TAG = "wallet" internal const val RECENT_KEY_TAG = "recent" internal fun loadingListState(tag: String, count: Int) = buildList { - repeat(count) { + repeat(count) { i -> add( DestinationRecipientListUM( - id = "$tag$it", + id = "$tag$i", isLoading = true, ), ) @@ -20,10 +20,10 @@ internal fun loadingListState(tag: String, count: Int) = buildList { }.toPersistentList() internal fun emptyListState(tag: String, count: Int) = buildList { - repeat(count) { + repeat(count) { i -> add( DestinationRecipientListUM( - id = "$tag$it", + id = "$tag$i", isLoading = false, isVisible = false, ), diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/SendDestinationValidationResultTransformer.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/SendDestinationValidationResultTransformer.kt index da3d010f3f..35cae2c471 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/SendDestinationValidationResultTransformer.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/transformers/SendDestinationValidationResultTransformer.kt @@ -21,8 +21,8 @@ internal class SendDestinationValidationResultTransformer( val isValidAddress = addressValidationResult.isRight() val isValidMemo = memoValidationResult.isRight() - val addressErrorText = addressValidationResult.mapLeft { - when (it) { + val addressErrorText = addressValidationResult.mapLeft { error -> + when (error) { is AddressValidation.Error.DataError, AddressValidation.Error.InvalidAddress, -> R.string.send_recipient_address_error diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/ui/SendDestinationContent.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/ui/SendDestinationContent.kt index 96592fdf28..4c18c81642 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/ui/SendDestinationContent.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/ui/SendDestinationContent.kt @@ -67,10 +67,13 @@ internal fun SendDestinationContent( onAddressChange = clickIntents::onRecipientAddressValueChange, onQrCodeClick = clickIntents::onQrCodeScanClick, ) - memoField( - memoField = state.memoTextField, - onMemoChange = clickIntents::onRecipientMemoValueChange, - ) + val memoTextField = state.memoTextField + if (memoTextField != null) { + memoField( + memoField = memoTextField, + onMemoChange = clickIntents::onRecipientMemoValueChange, + ) + } listHeaderItem( titleRes = if (state.isAccountsMode == true) { R.string.common_accounts @@ -153,40 +156,38 @@ private fun LazyListScope.addressItem( } private fun LazyListScope.memoField( - memoField: DestinationTextFieldUM.RecipientMemo?, + memoField: DestinationTextFieldUM.RecipientMemo, onMemoChange: (String, Boolean) -> Unit, ) { - if (memoField != null) { - item(key = MEMO_FIELD_KEY) { - val placeholder = if (memoField.isEnabled) memoField.placeholder else memoField.disabledText - TextFieldWithPaste( - value = memoField.value, - label = memoField.label, - placeholder = placeholder, - footer = annotatedReference( - buildAnnotatedString { - append(stringResourceSafe(R.string.send_recipient_memo_footer_v2)) - append("\n") - withStyle(SpanStyle(fontWeight = FontWeight.Medium)) { - appendColored( - text = stringResourceSafe( - R.string.send_recipient_memo_footer_v2_highlighted, - ), - color = TangemTheme.colors.text.secondary, - ) - } - }, - ), - onValueChange = { onMemoChange(it, false) }, - onPasteClick = { onMemoChange(it, true) }, - modifier = Modifier.padding(top = 20.dp), - labelStyle = TangemTheme.typography.subtitle2, - isError = memoField.isError, - error = memoField.error, - isReadOnly = !memoField.isEnabled, - isValuePasted = memoField.isValuePasted, - ) - } + item(key = MEMO_FIELD_KEY) { + val placeholder = if (memoField.isEnabled) memoField.placeholder else memoField.disabledText + TextFieldWithPaste( + value = memoField.value, + label = memoField.label, + placeholder = placeholder, + footer = annotatedReference( + buildAnnotatedString { + append(stringResourceSafe(R.string.send_recipient_memo_footer_v2)) + append("\n") + withStyle(SpanStyle(fontWeight = FontWeight.Medium)) { + appendColored( + text = stringResourceSafe( + R.string.send_recipient_memo_footer_v2_highlighted, + ), + color = TangemTheme.colors.text.secondary, + ) + } + }, + ), + onValueChange = { onMemoChange(it, false) }, + onPasteClick = { onMemoChange(it, true) }, + modifier = Modifier.padding(top = 20.dp), + labelStyle = TangemTheme.typography.subtitle2, + isError = memoField.isError, + error = memoField.error, + isReadOnly = !memoField.isEnabled, + isValuePasted = memoField.isValuePasted, + ) } } @@ -297,8 +298,8 @@ private fun AnimateRecentAppearance(isVisible: Boolean, content: @Composable () (slideInHorizontally() + fadeIn()) .togetherWith(slideOutVertically() + fadeOut()) }, - ) { - if (it) { + ) { currentVisibility -> + if (currentVisibility) { content() } else { Box(modifier = Modifier.fillMaxWidth()) diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/fee/model/converters/custom/bitcoin/BitcoinCustomFeeConverter.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/fee/model/converters/custom/bitcoin/BitcoinCustomFeeConverter.kt index 169610ae98..2d1b56c8bb 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/fee/model/converters/custom/bitcoin/BitcoinCustomFeeConverter.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/fee/model/converters/custom/bitcoin/BitcoinCustomFeeConverter.kt @@ -60,7 +60,7 @@ internal class BitcoinCustomFeeConverter( amount = feeValue, decimals = value.amount.decimals, txSize = value.txSize, - ).toString(), + )?.toString().orEmpty(), decimals = SATOSHI_DECIMALS, symbol = "", title = resourceReference(R.string.send_satoshi_per_byte_title), diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/fee/model/converters/custom/ethereum/EthereumCustomFeeConverter.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/fee/model/converters/custom/ethereum/EthereumCustomFeeConverter.kt index 1467aada51..65e2574a85 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/fee/model/converters/custom/ethereum/EthereumCustomFeeConverter.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/fee/model/converters/custom/ethereum/EthereumCustomFeeConverter.kt @@ -39,14 +39,16 @@ internal class EthereumCustomFeeConverter( override fun convert(value: Fee.Ethereum): ImmutableList { return buildList { - convertFeeValue(value).let(::add) + add(convertFeeValue(value)) - when (value) { - is Fee.Ethereum.EIP1559 -> eipFeeConverter.convert(value) - is Fee.Ethereum.Legacy -> legacyFeeConverter.convert(value) - }.let(::addAll) + addAll( + when (value) { + is Fee.Ethereum.EIP1559 -> eipFeeConverter.convert(value) + is Fee.Ethereum.Legacy -> legacyFeeConverter.convert(value) + }, + ) - convertGasLimitValue(value).let(::add) + add(convertGasLimitValue(value)) } .toImmutableList() } @@ -72,8 +74,18 @@ internal class EthereumCustomFeeConverter( value: String, ): ImmutableList { return when (feeValue) { - is Fee.Ethereum.EIP1559 -> eipFeeConverter.onValueChange(feeValue, customValues, index, value) - is Fee.Ethereum.Legacy -> legacyFeeConverter.onValueChange(feeValue, customValues, index, value) + is Fee.Ethereum.EIP1559 -> eipFeeConverter.onValueChange( + feeValue = feeValue, + customValues = customValues, + index = index, + value = value, + ) + is Fee.Ethereum.Legacy -> legacyFeeConverter.onValueChange( + feeValue = feeValue, + customValues = customValues, + index = index, + value = value, + ) } } diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/fee/model/converters/custom/kaspa/KaspaCustomFeeConverter.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/fee/model/converters/custom/kaspa/KaspaCustomFeeConverter.kt index 66607e3750..28c949d37e 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/fee/model/converters/custom/kaspa/KaspaCustomFeeConverter.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/fee/model/converters/custom/kaspa/KaspaCustomFeeConverter.kt @@ -101,15 +101,16 @@ internal class KaspaCustomFeeConverter( // check that there is reveal transaction info (= krc-20 token transfer) // return without changes otherwise if (minimumFee.revealTransactionFee != null && minimumFeeAmountValue != null) { - getOrNull(FEE_AMOUNT_INDEX)?.let { - val valueDecimal = it.value.parseToBigDecimal(it.decimals) + val customFeeFieldUM = getOrNull(FEE_AMOUNT_INDEX) + if (customFeeFieldUM != null) { + val valueDecimal = customFeeFieldUM.value.parseToBigDecimal(customFeeFieldUM.decimals) // krc-20 transaction will be failed if custom fee value is less than minimum, // so we set value to minimum in this case if (valueDecimal < minimumFee.amount.value) { - val fixedValue = minimumFeeAmountValue.parseBigDecimal(it.decimals) + val fixedValue = minimumFeeAmountValue.parseBigDecimal(customFeeFieldUM.decimals) set( FEE_AMOUNT_INDEX, - it.copy( + customFeeFieldUM.copy( value = fixedValue, label = getFiatReference( rate = currencyStatus.fiatRate, diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/notifications/analytics/NotificationsAnalyticEvents.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/notifications/analytics/NotificationsAnalyticEvents.kt index eeaeb2e51d..784e8dd40c 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/notifications/analytics/NotificationsAnalyticEvents.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/notifications/analytics/NotificationsAnalyticEvents.kt @@ -7,7 +7,7 @@ import com.tangem.core.analytics.models.AnalyticsParam.Key.TOKEN_PARAM internal sealed class NotificationsAnalyticEvents( category: String, event: String, - params: Map = mapOf(), + params: Map = emptyMap(), ) : AnalyticsEvent(category = category, event = event, params = params) { abstract val categoryName: String diff --git a/features/send-v2/impl/src/test/java/com/tangem/features/send/v2/send/confirm/model/transformers/NFTSendConfirmationNotificationsTransformerV2Test.kt b/features/send-v2/impl/src/test/java/com/tangem/features/send/v2/send/confirm/model/transformers/NFTSendConfirmationNotificationsTransformerV2Test.kt index e79d598f5e..b44e37a21d 100644 --- a/features/send-v2/impl/src/test/java/com/tangem/features/send/v2/send/confirm/model/transformers/NFTSendConfirmationNotificationsTransformerV2Test.kt +++ b/features/send-v2/impl/src/test/java/com/tangem/features/send/v2/send/confirm/model/transformers/NFTSendConfirmationNotificationsTransformerV2Test.kt @@ -167,7 +167,7 @@ class NFTSendConfirmationNotificationsTransformerV2Test { isPrimaryButtonEnabled = true, walletName = mockk(relaxed = true), isSending = false, - showTapHelp = false, + isShowTapHelp = false, sendingFooter = mockk(relaxed = true), notifications = persistentListOf(), ) diff --git a/features/send-v2/impl/src/test/java/com/tangem/features/send/v2/send/confirm/model/transformers/SendConfirmationNotificationsTransformerV2Test.kt b/features/send-v2/impl/src/test/java/com/tangem/features/send/v2/send/confirm/model/transformers/SendConfirmationNotificationsTransformerV2Test.kt index 803e634a9f..4e3050ec47 100644 --- a/features/send-v2/impl/src/test/java/com/tangem/features/send/v2/send/confirm/model/transformers/SendConfirmationNotificationsTransformerV2Test.kt +++ b/features/send-v2/impl/src/test/java/com/tangem/features/send/v2/send/confirm/model/transformers/SendConfirmationNotificationsTransformerV2Test.kt @@ -181,7 +181,7 @@ class SendConfirmationNotificationsTransformerV2Test { isPrimaryButtonEnabled = true, walletName = mockk(relaxed = true), isSending = false, - showTapHelp = false, + isShowTapHelp = false, sendingFooter = mockk(relaxed = true), notifications = persistentListOf(), ) diff --git a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/model/WcSendTransactionModel.kt b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/model/WcSendTransactionModel.kt index 2ed61e7552..611010e6f2 100644 --- a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/model/WcSendTransactionModel.kt +++ b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/model/WcSendTransactionModel.kt @@ -171,7 +171,7 @@ internal class WcSendTransactionModel @Inject constructor( feeReloadState.value = false modelScope.launch { feeSelectorReloadTrigger.triggerUpdate( - FeeSelectorData(removeSuggestedFee = feeStateConfiguration !is FeeStateConfiguration.Suggestion), + FeeSelectorData(isRemoveSuggestedFee = feeStateConfiguration !is FeeStateConfiguration.Suggestion), ) } }