Updated on 2026-08-14

This commit is contained in:
Tangem 2023-08-08 16:10:09 +03:00
parent c266b4c8c6
commit 31e4cafad0
6 changed files with 59 additions and 6 deletions

View file

@ -34,6 +34,11 @@ class CreateSecondTwinWalletTask(
return
}
if (!TwinsHelper.isTwinsCompatible(firstCardId, card.cardId)) {
callback(CompletionResult.Failure(IncompatibleTwinCard))
return
}
session.setMessage(preparingMessage)
PurgeWalletCommand(publicKey).run(session) { response ->
when (response) {

View file

@ -0,0 +1,12 @@
package com.tangem.tap.domain.twins
import com.tangem.common.core.TangemError
import com.tangem.tap.tangemSdkManager
import com.tangem.wallet.R
object IncompatibleTwinCard : TangemError(code = 50005) {
override var customMessage: String = tangemSdkManager.getString(
R.string.twin_error_wrong_twin,
)
override val messageResId: Int? = null
}