diff --git a/domain/wallets/src/main/java/com/tangem/domain/wallets/analytics/WalletSettingsAnalyticEvents.kt b/domain/wallets/src/main/java/com/tangem/domain/wallets/analytics/WalletSettingsAnalyticEvents.kt index be4e913124..850782d36a 100644 --- a/domain/wallets/src/main/java/com/tangem/domain/wallets/analytics/WalletSettingsAnalyticEvents.kt +++ b/domain/wallets/src/main/java/com/tangem/domain/wallets/analytics/WalletSettingsAnalyticEvents.kt @@ -171,6 +171,10 @@ sealed class WalletSettingsAnalyticEvents( event = "Wallet Upgraded", ), AppsFlyerIncludedEvent + class WalletsReorder : WalletSettingsAnalyticEvents( + event = "Longtap - Wallets Order", + ) + enum class RecoveryPhraseScreenAction(val value: String) { Upgrade("Upgrade"), Backup("Backup"), diff --git a/features/details/impl/src/main/kotlin/com/tangem/features/details/model/UserWalletListModel.kt b/features/details/impl/src/main/kotlin/com/tangem/features/details/model/UserWalletListModel.kt index 5c011e92c8..44af704d49 100644 --- a/features/details/impl/src/main/kotlin/com/tangem/features/details/model/UserWalletListModel.kt +++ b/features/details/impl/src/main/kotlin/com/tangem/features/details/model/UserWalletListModel.kt @@ -13,6 +13,7 @@ import com.tangem.core.decompose.ui.UiMessageSender import com.tangem.core.ui.extensions.TextReference import com.tangem.core.ui.extensions.resourceReference import com.tangem.domain.models.wallet.UserWalletId +import com.tangem.domain.wallets.analytics.WalletSettingsAnalyticEvents import com.tangem.domain.wallets.usecase.ApplyUserWalletListSortingUseCase import com.tangem.domain.wallets.usecase.UnlockWalletUseCase import com.tangem.features.details.entity.UserWalletListUM @@ -138,10 +139,11 @@ internal class UserWalletListModel @Inject constructor( val userWalletIds = state.value.userWallets.map { UserWalletId(it.id) } modelScope.launch { - applyUserWalletListSortingUseCase(userWalletIds) - .onLeft { error -> - Timber.e("Failed to apply wallet list sorting: $error") - } + applyUserWalletListSortingUseCase(userWalletIds).onRight { + analyticsEventHandler.send(WalletSettingsAnalyticEvents.WalletsReorder()) + }.onLeft { error -> + Timber.e("Failed to apply wallet list sorting: $error") + } } } } \ No newline at end of file