Updated on 2026-08-14

This commit is contained in:
Tangem 2023-01-23 22:13:52 +03:00
parent caaea924a2
commit 70f7dba30d
3 changed files with 5 additions and 3 deletions

View file

@ -9,12 +9,12 @@ sealed class MyWallets(
class MyWalletsScreenOpened : MyWallets(event = "My Wallets Screen Opened")
class CardWasScanned : MyWallets(event = "Card Was Scanned")
class WalletUnlockTapped : MyWallets(event = "Wallet Unlock Tapped")
sealed class Button {
class ScanNewCard : MyWallets(event = "Button - Scan New Card")
class UnlockWithBiometrics : MyWallets(event = "Button - Unlock all with Face ID")
class EditWalletTapped : MyWallets(event = "Button - Edit Wallet Tapped")
class DeleteWalletTapped : MyWallets(event = "Button - Delete Wallet Tapped")
class WalletUnlockTapped : MyWallets(event = "Button - Wallet Unlock Tapped")
}
}

View file

@ -206,6 +206,7 @@ internal class WalletSelectorMiddleware {
}
private suspend fun unlockUserWalletWithScannedCard(userWallet: UserWallet): CompletionResult<Unit> {
Analytics.send(MyWallets.Button.WalletUnlockTapped())
tangemSdkManager.changeDisplayedCardIdNumbersCount(userWallet.scanResponse)
return tangemSdkManager.scanCard(userWallet.cardId)
.map { scannedCard ->
@ -243,8 +244,6 @@ internal class WalletSelectorMiddleware {
}
private fun renameWallet(userWalletId: UserWalletId, newName: String) {
Analytics.send(MyWallets.Button.EditWalletTapped())
scope.launch {
userWalletsListManager.update(userWalletId) { it.copy(name = newName) }
.doOnFailure { error ->

View file

@ -2,7 +2,9 @@ package com.tangem.tap.features.walletSelector.ui
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.tangem.core.analytics.Analytics
import com.tangem.domain.common.util.UserWalletId
import com.tangem.tap.common.analytics.events.MyWallets
import com.tangem.tap.common.extensions.dispatchOnMain
import com.tangem.tap.features.walletSelector.redux.WalletSelectorAction
import com.tangem.tap.features.walletSelector.redux.WalletSelectorState
@ -71,6 +73,7 @@ internal class WalletSelectorViewModel : ViewModel(), StoreSubscriber<WalletSele
.find { it.id == editedUserWalletId }
if (editedUserWallet != null) {
Analytics.send(MyWallets.Button.EditWalletTapped())
val dialog = RenameWalletDialog(
currentName = editedUserWallet.name,
onApply = { newName ->