Updated on 2026-08-14

This commit is contained in:
Tangem 2020-11-13 14:44:50 +00:00
commit 4a2d4185ed
2 changed files with 9 additions and 7 deletions

View file

@ -168,12 +168,12 @@ class TapWalletManager {
when (result) {
is Result.Success -> {
val payId = result.data
if (tapWorkarounds?.isPayIdEnabled() == false) {
store.dispatch(WalletAction.DisablePayId)
return@withContext
}
if (payId == null) {
if (tapWorkarounds?.isPayIdCreationEnabled() == false) {
store.dispatch(WalletAction.DisablePayId)
} else {
store.dispatch(WalletAction.LoadPayId.NotCreated)
}
store.dispatch(WalletAction.LoadPayId.NotCreated)
} else {
store.dispatch(WalletAction.LoadPayId.Success(payId))
}

View file

@ -1,12 +1,14 @@
package com.tangem.tap.domain
import com.tangem.commands.Card
import java.util.*
class TapWorkarounds(val card: Card) {
val isStart2Coin: Boolean = card.cardData?.issuerName == START_2_COIN_ISSUER
val isStart2Coin: Boolean =
card.cardData?.issuerName?.toLowerCase(Locale.US) == START_2_COIN_ISSUER
fun isPayIdCreationEnabled(): Boolean {
fun isPayIdEnabled(): Boolean {
if (isStart2Coin) return false
return true
}