Updated on 2026-08-14
This commit is contained in:
parent
9bd16deeb4
commit
107fed3480
16 changed files with 114 additions and 108 deletions
|
|
@ -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,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
────────────────────────────────────────────────────────────────
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" ?>
|
||||
<SmellBaseline>
|
||||
<ManuallySuppressedIssues/>
|
||||
<CurrentIssues>
|
||||
<ID>SuspendFunSwallowedCancellation:SetVisaPinCodeUseCase.kt$SetVisaPinCodeUseCase$runCatching</ID>
|
||||
</CurrentIssues>
|
||||
</SmellBaseline>
|
||||
|
|
@ -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<UniversalError, Unit> = runCatching {
|
||||
): Either<UniversalError, Unit> = runSuspendCatching {
|
||||
val visaActivationRepository = visaActivationRepositoryFactory.create(visaCardId)
|
||||
val rsaPublicKey = visaActivationRepository.getPinCodeRsaEncryptionPublicKey()
|
||||
val formattedPin = "24$pinCode${"f".repeat(n = 8)}FF"
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" ?>
|
||||
<SmellBaseline>
|
||||
<ManuallySuppressedIssues/>
|
||||
<CurrentIssues>
|
||||
<ID>UseEmptyCounterpart:WcAnalyticEvents.kt$WcAnalyticEvents$mapOf()</ID>
|
||||
</CurrentIssues>
|
||||
</SmellBaseline>
|
||||
|
|
@ -16,14 +16,14 @@ import com.tangem.utils.extensions.mapNotNullValues
|
|||
|
||||
sealed class WcAnalyticEvents(
|
||||
event: String,
|
||||
params: Map<String, String> = mapOf(),
|
||||
params: Map<String, String> = 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) {
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" ?>
|
||||
<SmellBaseline>
|
||||
<ManuallySuppressedIssues/>
|
||||
<CurrentIssues>
|
||||
<ID>NullableToStringCall:DisclaimerWebViewClient.kt$DisclaimerWebViewClient$$url</ID>
|
||||
</CurrentIssues>
|
||||
</SmellBaseline>
|
||||
|
|
@ -14,6 +14,7 @@ import timber.log.Timber
|
|||
*
|
||||
[REDACTED_AUTHOR]
|
||||
*/
|
||||
@Suppress("NullableToStringCall")
|
||||
internal class DisclaimerWebViewClient(
|
||||
private val onLoadingFinished: () -> Unit,
|
||||
) : AccompanistWebViewClient() {
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" ?>
|
||||
<SmellBaseline>
|
||||
<ManuallySuppressedIssues/>
|
||||
<CurrentIssues>
|
||||
<ID>BooleanPropertyNaming:CreateWalletBackupComponent.kt$CreateWalletBackupComponent.Params$val setAccessCode: Boolean</ID>
|
||||
</CurrentIssues>
|
||||
</SmellBaseline>
|
||||
|
|
@ -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<Params, CreateWalletBackupComponent>
|
||||
|
|
|
|||
|
|
@ -56,7 +56,6 @@
|
|||
<ID>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, ), )</ID>
|
||||
<ID>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, ) } } }</ID>
|
||||
<ID>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, )</ID>
|
||||
<ID>SuspendFunSwallowedCancellation:AccessCodeModel.kt$AccessCodeModel$runCatching</ID>
|
||||
<ID>SuspendFunSwallowedCancellation:AddExistingWalletImportModel.kt$AddExistingWalletImportModel$runCatching</ID>
|
||||
<ID>SuspendFunSwallowedCancellation:ManualBackupCheckModel.kt$ManualBackupCheckModel$runCatching</ID>
|
||||
<ID>SuspendFunSwallowedCancellation:ManualBackupPhraseModel.kt$ManualBackupPhraseModel$runCatching</ID>
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" ?>
|
||||
<SmellBaseline>
|
||||
<ManuallySuppressedIssues/>
|
||||
<CurrentIssues>
|
||||
<ID>PropertyUsedBeforeDeclaration:ManageTokensSource.kt$AddCustomTokenMode$userWalletId</ID>
|
||||
</CurrentIssues>
|
||||
</SmellBaseline>
|
||||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue