Updated on 2026-08-14
This commit is contained in:
parent
c266b4c8c6
commit
31e4cafad0
6 changed files with 59 additions and 6 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue