Updated on 2026-08-14

This commit is contained in:
Tangem 2026-05-04 15:18:02 +04:00
parent 85545863e3
commit 926e89e975
16 changed files with 158 additions and 223 deletions

View file

@ -93,6 +93,13 @@ fun UserWallet.isImported(): Boolean {
}
}
fun UserWallet.isBackedUpForAnalytics(): Boolean {
return when (this) {
is UserWallet.Cold -> scanResponse.card.backupStatus?.isActive == true
is UserWallet.Hot -> backedUp
}
}
fun UserWallet.copy(name: String = this.name, walletId: UserWalletId = this.walletId): UserWallet = when (this) {
is UserWallet.Cold -> this.copy(name = name, walletId = walletId)
is UserWallet.Hot -> this.copy(name = name, walletId = walletId)