diff --git a/app/src/main/java/com/tangem/tap/routing/utils/ChildFactory.kt b/app/src/main/java/com/tangem/tap/routing/utils/ChildFactory.kt
index 3b8a4de86d..022b1adfc8 100644
--- a/app/src/main/java/com/tangem/tap/routing/utils/ChildFactory.kt
+++ b/app/src/main/java/com/tangem/tap/routing/utils/ChildFactory.kt
@@ -562,7 +562,7 @@ internal class ChildFactory @Inject constructor(
params = CreateWalletBackupComponent.Params(
userWalletId = route.userWalletId,
isUpgradeFlow = route.isUpgradeFlow,
- setAccessCode = route.setAccessCode,
+ shouldSetAccessCode = route.setAccessCode,
),
componentFactory = createWalletBackupComponentFactory,
)
diff --git a/data/tokens/src/main/kotlin/com/tangem/data/tokens/di/TokensDataModule.kt b/data/tokens/src/main/kotlin/com/tangem/data/tokens/di/TokensDataModule.kt
index 58bc11680b..1941b6ee4b 100644
--- a/data/tokens/src/main/kotlin/com/tangem/data/tokens/di/TokensDataModule.kt
+++ b/data/tokens/src/main/kotlin/com/tangem/data/tokens/di/TokensDataModule.kt
@@ -5,14 +5,22 @@ import com.tangem.data.common.cache.CacheRegistry
import com.tangem.data.common.currency.CardCryptoCurrencyFactory
import com.tangem.data.common.currency.ResponseCryptoCurrenciesFactory
import com.tangem.data.common.currency.UserTokensSaver
-import com.tangem.data.tokens.repository.*
+import com.tangem.data.tokens.repository.DefaultCurrenciesRepository
+import com.tangem.data.tokens.repository.DefaultCurrencyChecksRepository
+import com.tangem.data.tokens.repository.DefaultTokenReceiveWarningsViewedRepository
+import com.tangem.data.tokens.repository.DefaultYieldSupplyWarningsViewedRepository
import com.tangem.datasource.api.tangemTech.TangemTechApi
import com.tangem.datasource.local.preferences.AppPreferencesStore
import com.tangem.datasource.local.token.TokenReceiveWarningActionStore
import com.tangem.datasource.local.token.UserTokensResponseStore
import com.tangem.datasource.local.userwallet.UserWalletsStore
+import com.tangem.domain.account.featuretoggle.AccountsFeatureToggles
import com.tangem.domain.express.ExpressServiceFetcher
-import com.tangem.domain.tokens.repository.*
+import com.tangem.domain.tokens.MultiWalletCryptoCurrenciesSupplier
+import com.tangem.domain.tokens.repository.CurrenciesRepository
+import com.tangem.domain.tokens.repository.CurrencyChecksRepository
+import com.tangem.domain.tokens.repository.TokenReceiveWarningsViewedRepository
+import com.tangem.domain.tokens.repository.YieldSupplyWarningsViewedRepository
import com.tangem.domain.walletmanager.WalletManagersFacade
import com.tangem.utils.coroutines.CoroutineDispatcherProvider
import dagger.Module
@@ -39,6 +47,8 @@ internal object TokensDataModule {
cardCryptoCurrencyFactory: CardCryptoCurrencyFactory,
tokensSaver: UserTokensSaver,
responseCryptoCurrenciesFactory: ResponseCryptoCurrenciesFactory,
+ multiWalletCryptoCurrenciesSupplier: MultiWalletCryptoCurrenciesSupplier,
+ accountsFeatureToggles: AccountsFeatureToggles,
): CurrenciesRepository {
return DefaultCurrenciesRepository(
tangemTechApi = tangemTechApi,
@@ -52,6 +62,8 @@ internal object TokensDataModule {
cardCryptoCurrencyFactory = cardCryptoCurrencyFactory,
userTokensSaver = tokensSaver,
responseCryptoCurrenciesFactory = responseCryptoCurrenciesFactory,
+ multiWalletCryptoCurrenciesSupplier = multiWalletCryptoCurrenciesSupplier,
+ accountsFeatureToggles = accountsFeatureToggles,
)
}
diff --git a/data/tokens/src/main/kotlin/com/tangem/data/tokens/repository/DefaultCurrenciesRepository.kt b/data/tokens/src/main/kotlin/com/tangem/data/tokens/repository/DefaultCurrenciesRepository.kt
index 834125482e..e2988f92ce 100644
--- a/data/tokens/src/main/kotlin/com/tangem/data/tokens/repository/DefaultCurrenciesRepository.kt
+++ b/data/tokens/src/main/kotlin/com/tangem/data/tokens/repository/DefaultCurrenciesRepository.kt
@@ -14,6 +14,7 @@ import com.tangem.datasource.api.tangemTech.TangemTechApi
import com.tangem.datasource.api.tangemTech.models.UserTokensResponse
import com.tangem.datasource.local.token.UserTokensResponseStore
import com.tangem.datasource.local.userwallet.UserWalletsStore
+import com.tangem.domain.account.featuretoggle.AccountsFeatureToggles
import com.tangem.domain.card.CardTypesResolver
import com.tangem.domain.card.common.util.cardTypesResolver
import com.tangem.domain.core.error.DataError
@@ -24,6 +25,8 @@ import com.tangem.domain.models.currency.CryptoCurrency
import com.tangem.domain.models.currency.CryptoCurrencyStatus
import com.tangem.domain.models.network.Network
import com.tangem.domain.models.wallet.*
+import com.tangem.domain.tokens.MultiWalletCryptoCurrenciesProducer
+import com.tangem.domain.tokens.MultiWalletCryptoCurrenciesSupplier
import com.tangem.domain.tokens.model.FeePaidCurrency
import com.tangem.domain.tokens.repository.CurrenciesRepository
import com.tangem.domain.walletmanager.WalletManagersFacade
@@ -45,6 +48,8 @@ internal class DefaultCurrenciesRepository(
private val userTokensSaver: UserTokensSaver,
private val userTokensResponseStore: UserTokensResponseStore,
private val responseCryptoCurrenciesFactory: ResponseCryptoCurrenciesFactory,
+ private val accountsFeatureToggles: AccountsFeatureToggles,
+ private val multiWalletCryptoCurrenciesSupplier: MultiWalletCryptoCurrenciesSupplier,
excludedBlockchains: ExcludedBlockchains,
) : CurrenciesRepository {
@@ -305,6 +310,35 @@ internal class DefaultCurrenciesRepository(
userWalletId: UserWalletId,
networkId: Network.ID,
derivationPath: Network.DerivationPath,
+ ): CryptoCurrency.Coin {
+ return if (accountsFeatureToggles.isFeatureEnabled) {
+ getNetworkCoinNew(userWalletId, networkId, derivationPath)
+ } else {
+ getNetworkCoinLegacy(userWalletId, networkId, derivationPath)
+ }
+ }
+
+ private suspend fun getNetworkCoinNew(
+ userWalletId: UserWalletId,
+ networkId: Network.ID,
+ derivationPath: Network.DerivationPath,
+ ): CryptoCurrency.Coin = withContext(dispatchers.default) {
+ multiWalletCryptoCurrenciesSupplier.getSyncOrNull(
+ params = MultiWalletCryptoCurrenciesProducer.Params(userWalletId = userWalletId),
+ )
+ .orEmpty()
+ .find { currency ->
+ currency is CryptoCurrency.Coin &&
+ currency.network.id.rawId == networkId.rawId &&
+ currency.network.derivationPath == derivationPath
+ } as? CryptoCurrency.Coin
+ ?: error("Unable to find coin for network ID: $networkId")
+ }
+
+ private suspend fun getNetworkCoinLegacy(
+ userWalletId: UserWalletId,
+ networkId: Network.ID,
+ derivationPath: Network.DerivationPath,
): CryptoCurrency.Coin {
return withContext(dispatchers.io) {
val userWallet = userWalletsStore.getSyncStrict(userWalletId)
diff --git a/detekt_baseline_report.txt b/detekt_baseline_report.txt
index 2017064be7..5a6ea045d6 100644
--- a/detekt_baseline_report.txt
+++ b/detekt_baseline_report.txt
@@ -1,7 +1,7 @@
==========================================
Detekt Baseline Updater & Issue Counter
==========================================
-Date: 2025-11-24 18:35:00
+Date: 2025-11-25 17:21:16
Step 1: Running detekt to check for new issues...
@@ -17,13 +17,13 @@ Counting issues in baseline files...
==========================================
Summary:
- Total Issues: 1700
- Modules with Issues: 83
- Average Issues per Module: 20
+ Total Issues: 1694
+ Modules with Issues: 78
+ Average Issues per Module: 21
Progress:
- Fixed: 102 out of 1802 (5%)
- Remaining: 1700
+ Fixed: 108 out of 1802 (5%)
+ Remaining: 1694
==========================================
All Modules with Issues (sorted by count)
@@ -37,7 +37,7 @@ features/onboarding-v2/impl 131
features/onramp/impl 89
features/send-v2/impl 80
features/swap/impl 73
-features/hot-wallet/impl 58
+features/hot-wallet/impl 57
features/staking/impl 56
data/wallet-connect 55
features/swap-v2/impl 53
@@ -108,10 +108,5 @@ domain/nft 2
data/express 2
core/ab-tests 2
common/test 2
-features/manage-tokens/api 1
features/kyc/impl 1
-features/hot-wallet/api 1
-features/disclaimer/impl 1
-domain/wallet-connect 1
-domain/visa 1
────────────────────────────────────────────────────────────────
\ No newline at end of file
diff --git a/domain/visa/detekt-baseline-debug.xml b/domain/visa/detekt-baseline-debug.xml
deleted file mode 100644
index 6f7affc0e3..0000000000
--- a/domain/visa/detekt-baseline-debug.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
- SuspendFunSwallowedCancellation:SetVisaPinCodeUseCase.kt$SetVisaPinCodeUseCase$runCatching
-
-
diff --git a/domain/visa/src/main/kotlin/com/tangem/domain/visa/SetVisaPinCodeUseCase.kt b/domain/visa/src/main/kotlin/com/tangem/domain/visa/SetVisaPinCodeUseCase.kt
index 20f95b2d40..fe2785bc3c 100644
--- a/domain/visa/src/main/kotlin/com/tangem/domain/visa/SetVisaPinCodeUseCase.kt
+++ b/domain/visa/src/main/kotlin/com/tangem/domain/visa/SetVisaPinCodeUseCase.kt
@@ -9,6 +9,7 @@ import com.tangem.domain.visa.error.VisaActivationError
import com.tangem.domain.visa.model.VisaCardId
import com.tangem.domain.visa.model.VisaEncryptedPinCode
import com.tangem.domain.visa.repository.VisaActivationRepository
+import com.tangem.utils.coroutines.runSuspendCatching
import java.security.Key
import java.security.KeyFactory
import java.security.PublicKey
@@ -27,7 +28,7 @@ class SetVisaPinCodeUseCase(private val visaActivationRepositoryFactory: VisaAct
visaCardId: VisaCardId,
activationOrderId: String,
pinCode: String,
- ): Either = runCatching {
+ ): Either = runSuspendCatching {
val visaActivationRepository = visaActivationRepositoryFactory.create(visaCardId)
val rsaPublicKey = visaActivationRepository.getPinCodeRsaEncryptionPublicKey()
val formattedPin = "24$pinCode${"f".repeat(n = 8)}FF"
diff --git a/domain/wallet-connect/detekt-baseline-debug.xml b/domain/wallet-connect/detekt-baseline-debug.xml
deleted file mode 100644
index 9f061ccbe0..0000000000
--- a/domain/wallet-connect/detekt-baseline-debug.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
- UseEmptyCounterpart:WcAnalyticEvents.kt$WcAnalyticEvents$mapOf()
-
-
diff --git a/domain/wallet-connect/src/main/kotlin/com/tangem/domain/walletconnect/WcAnalyticEvents.kt b/domain/wallet-connect/src/main/kotlin/com/tangem/domain/walletconnect/WcAnalyticEvents.kt
index 1ccecda5d1..8bcf3eb116 100644
--- a/domain/wallet-connect/src/main/kotlin/com/tangem/domain/walletconnect/WcAnalyticEvents.kt
+++ b/domain/wallet-connect/src/main/kotlin/com/tangem/domain/walletconnect/WcAnalyticEvents.kt
@@ -16,14 +16,14 @@ import com.tangem.utils.extensions.mapNotNullValues
sealed class WcAnalyticEvents(
event: String,
- params: Map = mapOf(),
+ params: Map = emptyMap(),
) : AnalyticsEvent(category = WC_CATEGORY_NAME, event = event, params = params) {
object ScreenOpened : WcAnalyticEvents(event = "WC Screen Opened")
class NewPairInitiated(source: WcPairRequest.Source) : WcAnalyticEvents(
event = "Session Initiated",
params = mapOf(
- AnalyticsParam.Key.SOURCE to when (source) {
+ AnalyticsParam.SOURCE to when (source) {
WcPairRequest.Source.QR -> "QR"
WcPairRequest.Source.DEEPLINK -> "DeepLink"
WcPairRequest.Source.CLIPBOARD -> "Clipboard"
@@ -57,8 +57,8 @@ sealed class WcAnalyticEvents(
) : WcAnalyticEvents(
event = "Session Failed",
params = mapOf(
- AnalyticsParam.Key.ERROR_CODE to errorCode,
- AnalyticsParam.Key.ERROR_DESCRIPTION to errorMessage,
+ AnalyticsParam.ERROR_CODE to errorCode,
+ AnalyticsParam.ERROR_DESCRIPTION to errorMessage,
),
)
@@ -69,9 +69,9 @@ sealed class WcAnalyticEvents(
) : WcAnalyticEvents(
event = "dApp Connected",
params = mapOf(
- AnalyticsParam.Key.DAPP_NAME to sessionProposal.dAppMetaData.name,
- AnalyticsParam.Key.DAPP_URL to sessionProposal.dAppMetaData.url,
- AnalyticsParam.Key.BLOCKCHAIN to sessionForApprove.network.joinToString(",") { it.name },
+ AnalyticsParam.DAPP_NAME to sessionProposal.dAppMetaData.name,
+ AnalyticsParam.DAPP_URL to sessionProposal.dAppMetaData.url,
+ AnalyticsParam.BLOCKCHAIN to sessionForApprove.network.joinToString(",") { it.name },
DOMAIN_VERIFICATION to securityStatus.toAnalyticVerificationStatus(),
),
)
@@ -82,16 +82,16 @@ sealed class WcAnalyticEvents(
) : WcAnalyticEvents(
event = "dApp Connection Failed",
params = mapOf(
- AnalyticsParam.Key.ERROR_CODE to errorCode,
- AnalyticsParam.Key.ERROR_DESCRIPTION to errorMessage,
+ AnalyticsParam.ERROR_CODE to errorCode,
+ AnalyticsParam.ERROR_DESCRIPTION to errorMessage,
),
)
class SessionDisconnected(dAppMetaData: WcAppMetaData) : WcAnalyticEvents(
event = "dApp Disconnected",
params = mapOf(
- AnalyticsParam.Key.DAPP_NAME to dAppMetaData.name,
- AnalyticsParam.Key.DAPP_URL to dAppMetaData.url,
+ AnalyticsParam.DAPP_NAME to dAppMetaData.name,
+ AnalyticsParam.DAPP_URL to dAppMetaData.url,
),
)
@@ -101,10 +101,10 @@ sealed class WcAnalyticEvents(
) : WcAnalyticEvents(
event = "Transaction Details Opened",
params = mapOf(
- AnalyticsParam.Key.DAPP_NAME to rawRequest.dAppMetaData.name,
- AnalyticsParam.Key.DAPP_URL to rawRequest.dAppMetaData.url,
- AnalyticsParam.Key.METHOD_NAME to rawRequest.request.method,
- AnalyticsParam.Key.BLOCKCHAIN to network.name,
+ AnalyticsParam.DAPP_NAME to rawRequest.dAppMetaData.name,
+ AnalyticsParam.DAPP_URL to rawRequest.dAppMetaData.url,
+ AnalyticsParam.METHOD_NAME to rawRequest.request.method,
+ AnalyticsParam.BLOCKCHAIN to network.name,
),
)
@@ -116,12 +116,12 @@ sealed class WcAnalyticEvents(
) : WcAnalyticEvents(
event = "Signature Request Received",
params = mapOf(
- AnalyticsParam.Key.DAPP_NAME to rawRequest.dAppMetaData.name,
- AnalyticsParam.Key.DAPP_URL to rawRequest.dAppMetaData.url,
- AnalyticsParam.Key.METHOD_NAME to rawRequest.request.method,
- AnalyticsParam.Key.BLOCKCHAIN to network.name,
- AnalyticsParam.Key.EMULATION_STATUS to emulationStatus?.status,
- AnalyticsParam.Key.TYPE to securityStatus.toAnalyticVerificationStatus(),
+ AnalyticsParam.DAPP_NAME to rawRequest.dAppMetaData.name,
+ AnalyticsParam.DAPP_URL to rawRequest.dAppMetaData.url,
+ AnalyticsParam.METHOD_NAME to rawRequest.request.method,
+ AnalyticsParam.BLOCKCHAIN to network.name,
+ AnalyticsParam.EMULATION_STATUS to emulationStatus?.status,
+ AnalyticsParam.TYPE to securityStatus.toAnalyticVerificationStatus(),
).mapNotNullValues { it.value },
) {
enum class EmulationStatus(val status: String) {
@@ -138,11 +138,11 @@ sealed class WcAnalyticEvents(
) : WcAnalyticEvents(
event = "Signature Request Handled",
params = mapOf(
- AnalyticsParam.Key.DAPP_NAME to rawRequest.dAppMetaData.name,
- AnalyticsParam.Key.DAPP_URL to rawRequest.dAppMetaData.url,
- AnalyticsParam.Key.METHOD_NAME to rawRequest.request.method,
- AnalyticsParam.Key.BLOCKCHAIN to network.name,
- AnalyticsParam.Key.TYPE to securityStatus.toAnalyticVerificationStatus(),
+ AnalyticsParam.DAPP_NAME to rawRequest.dAppMetaData.name,
+ AnalyticsParam.DAPP_URL to rawRequest.dAppMetaData.url,
+ AnalyticsParam.METHOD_NAME to rawRequest.request.method,
+ AnalyticsParam.BLOCKCHAIN to network.name,
+ AnalyticsParam.TYPE to securityStatus.toAnalyticVerificationStatus(),
),
)
@@ -154,12 +154,12 @@ sealed class WcAnalyticEvents(
) : WcAnalyticEvents(
event = "Signature Request Failed",
params = mapOf(
- AnalyticsParam.Key.DAPP_NAME to rawRequest.dAppMetaData.name,
- AnalyticsParam.Key.DAPP_URL to rawRequest.dAppMetaData.url,
- AnalyticsParam.Key.METHOD_NAME to rawRequest.request.method,
- AnalyticsParam.Key.BLOCKCHAIN to network.name,
- AnalyticsParam.Key.ERROR_CODE to errorCode,
- AnalyticsParam.Key.ERROR_DESCRIPTION to errorMessage,
+ AnalyticsParam.DAPP_NAME to rawRequest.dAppMetaData.name,
+ AnalyticsParam.DAPP_URL to rawRequest.dAppMetaData.url,
+ AnalyticsParam.METHOD_NAME to rawRequest.request.method,
+ AnalyticsParam.BLOCKCHAIN to network.name,
+ AnalyticsParam.ERROR_CODE to errorCode,
+ AnalyticsParam.ERROR_DESCRIPTION to errorMessage,
),
)
@@ -171,12 +171,12 @@ sealed class WcAnalyticEvents(
) : WcAnalyticEvents(
event = "Signature Request Received with Failed",
params = mapOf(
- AnalyticsParam.Key.DAPP_NAME to rawRequest.dAppMetaData.name,
- AnalyticsParam.Key.DAPP_URL to rawRequest.dAppMetaData.url,
- AnalyticsParam.Key.METHOD_NAME to rawRequest.request.method,
- AnalyticsParam.Key.BLOCKCHAIN to blockchain,
- AnalyticsParam.Key.ERROR_CODE to errorCode,
- AnalyticsParam.Key.ERROR_DESCRIPTION to errorMessage,
+ AnalyticsParam.DAPP_NAME to rawRequest.dAppMetaData.name,
+ AnalyticsParam.DAPP_URL to rawRequest.dAppMetaData.url,
+ AnalyticsParam.METHOD_NAME to rawRequest.request.method,
+ AnalyticsParam.BLOCKCHAIN to blockchain,
+ AnalyticsParam.ERROR_CODE to errorCode,
+ AnalyticsParam.ERROR_DESCRIPTION to errorMessage,
),
)
@@ -185,7 +185,7 @@ sealed class WcAnalyticEvents(
) : WcAnalyticEvents(
event = "Button - Sign",
params = mapOf(
- AnalyticsParam.Key.METHOD_NAME to rawRequest.request.method,
+ AnalyticsParam.METHOD_NAME to rawRequest.request.method,
),
)
@@ -194,7 +194,7 @@ sealed class WcAnalyticEvents(
) : WcAnalyticEvents(
event = "Button - Cancel",
params = mapOf(
- AnalyticsParam.Key.TYPE to type.type,
+ AnalyticsParam.TYPE to type.type,
),
) {
enum class Type(val type: String) {
@@ -212,8 +212,8 @@ sealed class WcAnalyticEvents(
) : WcAnalyticEvents(
event = "Button - Disconnect",
params = mapOf(
- AnalyticsParam.Key.DAPP_NAME to session.sdkModel.appMetaData.name,
- AnalyticsParam.Key.DAPP_URL to session.sdkModel.appMetaData.url,
+ AnalyticsParam.DAPP_NAME to session.sdkModel.appMetaData.name,
+ AnalyticsParam.DAPP_URL to session.sdkModel.appMetaData.url,
),
)
@@ -224,13 +224,13 @@ sealed class WcAnalyticEvents(
) : WcAnalyticEvents(
event = "Notice - Security Alert",
params = mapOf(
- AnalyticsParam.Key.DAPP_NAME to dAppMetaData.name,
- AnalyticsParam.Key.DAPP_URL to dAppMetaData.url,
- AnalyticsParam.Key.SOURCE to when (source) {
+ AnalyticsParam.DAPP_NAME to dAppMetaData.name,
+ AnalyticsParam.DAPP_URL to dAppMetaData.url,
+ AnalyticsParam.SOURCE to when (source) {
Source.Domain -> "Domain"
Source.SmartContract -> "Smart Contract"
},
- AnalyticsParam.Key.TYPE to securityStatus.toAnalyticVerificationStatus(),
+ AnalyticsParam.TYPE to securityStatus.toAnalyticVerificationStatus(),
),
) {
enum class Source { Domain, SmartContract }
@@ -241,7 +241,7 @@ sealed class WcAnalyticEvents(
) : WcAnalyticEvents(
event = "Solana Large Transaction",
params = mapOf(
- AnalyticsParam.Key.DAPP_NAME to dappName,
+ AnalyticsParam.DAPP_NAME to dappName,
),
)
@@ -250,7 +250,7 @@ sealed class WcAnalyticEvents(
) : WcAnalyticEvents(
event = "Solana Large Transaction Status",
params = mapOf(
- AnalyticsParam.Key.STATUS to status.value,
+ AnalyticsParam.STATUS to status.value,
),
) {
enum class Status(val value: String) {
diff --git a/features/disclaimer/impl/detekt-baseline-debug.xml b/features/disclaimer/impl/detekt-baseline-debug.xml
deleted file mode 100644
index d104e3978e..0000000000
--- a/features/disclaimer/impl/detekt-baseline-debug.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
- NullableToStringCall:DisclaimerWebViewClient.kt$DisclaimerWebViewClient$$url
-
-
diff --git a/features/disclaimer/impl/src/main/java/com/tangem/features/disclaimer/impl/ui/DisclaimerWebViewClient.kt b/features/disclaimer/impl/src/main/java/com/tangem/features/disclaimer/impl/ui/DisclaimerWebViewClient.kt
index c5fbbfb32b..000dbb6aeb 100644
--- a/features/disclaimer/impl/src/main/java/com/tangem/features/disclaimer/impl/ui/DisclaimerWebViewClient.kt
+++ b/features/disclaimer/impl/src/main/java/com/tangem/features/disclaimer/impl/ui/DisclaimerWebViewClient.kt
@@ -14,6 +14,7 @@ import timber.log.Timber
*
[REDACTED_AUTHOR]
*/
+@Suppress("NullableToStringCall")
internal class DisclaimerWebViewClient(
private val onLoadingFinished: () -> Unit,
) : AccompanistWebViewClient() {
diff --git a/features/hot-wallet/api/detekt-baseline-debug.xml b/features/hot-wallet/api/detekt-baseline-debug.xml
deleted file mode 100644
index a4cc7258d2..0000000000
--- a/features/hot-wallet/api/detekt-baseline-debug.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
- BooleanPropertyNaming:CreateWalletBackupComponent.kt$CreateWalletBackupComponent.Params$val setAccessCode: Boolean
-
-
diff --git a/features/hot-wallet/api/src/main/kotlin/com/tangem/features/hotwallet/CreateWalletBackupComponent.kt b/features/hot-wallet/api/src/main/kotlin/com/tangem/features/hotwallet/CreateWalletBackupComponent.kt
index c8de6fdca5..7ecc294b25 100644
--- a/features/hot-wallet/api/src/main/kotlin/com/tangem/features/hotwallet/CreateWalletBackupComponent.kt
+++ b/features/hot-wallet/api/src/main/kotlin/com/tangem/features/hotwallet/CreateWalletBackupComponent.kt
@@ -9,7 +9,7 @@ interface CreateWalletBackupComponent : ComposableContentComponent {
data class Params(
val userWalletId: UserWalletId,
val isUpgradeFlow: Boolean,
- val setAccessCode: Boolean,
+ val shouldSetAccessCode: Boolean,
)
interface Factory : ComponentFactory
diff --git a/features/hot-wallet/impl/detekt-baseline-debug.xml b/features/hot-wallet/impl/detekt-baseline-debug.xml
index 7c9a0a04ef..897f428e06 100644
--- a/features/hot-wallet/impl/detekt-baseline-debug.xml
+++ b/features/hot-wallet/impl/detekt-baseline-debug.xml
@@ -56,7 +56,6 @@
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:AccessCodeModel.kt$AccessCodeModel$runCatching
SuspendFunSwallowedCancellation:AddExistingWalletImportModel.kt$AddExistingWalletImportModel$runCatching
SuspendFunSwallowedCancellation:ManualBackupCheckModel.kt$ManualBackupCheckModel$runCatching
SuspendFunSwallowedCancellation:ManualBackupPhraseModel.kt$ManualBackupPhraseModel$runCatching
diff --git a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/createwalletbackup/CreateWalletBackupModel.kt b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/createwalletbackup/CreateWalletBackupModel.kt
index c81edf60cd..5980bf78e0 100644
--- a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/createwalletbackup/CreateWalletBackupModel.kt
+++ b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/createwalletbackup/CreateWalletBackupModel.kt
@@ -70,13 +70,13 @@ internal class CreateWalletBackupModel @Inject constructor(
stackNavigation.push(
configuration = CreateWalletBackupRoute.BackupCompleted(
isUpgradeFlow = params.isUpgradeFlow,
- isLastScreen = !params.setAccessCode,
+ isLastScreen = !params.shouldSetAccessCode,
),
)
}
fun onManualBackupCompleted() {
- if (params.setAccessCode) {
+ if (params.shouldSetAccessCode) {
router.replaceCurrent(
route = AppRoute.UpdateAccessCode(
userWalletId = params.userWalletId,
diff --git a/features/manage-tokens/api/detekt-baseline-debug.xml b/features/manage-tokens/api/detekt-baseline-debug.xml
deleted file mode 100644
index a71e6537bf..0000000000
--- a/features/manage-tokens/api/detekt-baseline-debug.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
- PropertyUsedBeforeDeclaration:ManageTokensSource.kt$AddCustomTokenMode$userWalletId
-
-
diff --git a/features/manage-tokens/api/src/main/kotlin/com/tangem/features/managetokens/component/ManageTokensSource.kt b/features/manage-tokens/api/src/main/kotlin/com/tangem/features/managetokens/component/ManageTokensSource.kt
index bdd3cdbc10..3c5fa79e29 100644
--- a/features/manage-tokens/api/src/main/kotlin/com/tangem/features/managetokens/component/ManageTokensSource.kt
+++ b/features/manage-tokens/api/src/main/kotlin/com/tangem/features/managetokens/component/ManageTokensSource.kt
@@ -19,11 +19,10 @@ sealed interface ManageTokensMode {
sealed interface AddCustomTokenMode {
val userWalletId: UserWalletId
- get() = when (this) {
- is Account -> accountId.userWalletId
- is Wallet -> userWalletId
- }
data class Wallet(override val userWalletId: UserWalletId) : AddCustomTokenMode
- data class Account(val accountId: AccountId) : AddCustomTokenMode
+
+ data class Account(val accountId: AccountId) : AddCustomTokenMode {
+ override val userWalletId: UserWalletId = accountId.userWalletId
+ }
}
\ No newline at end of file