Updated on 2026-08-14

This commit is contained in:
Tangem 2020-11-14 08:44:36 +03:00
commit ecb012fd1b
4 changed files with 11 additions and 9 deletions

View file

@ -70,7 +70,7 @@ dependencies {
implementation 'com.google.android.material:material:1.2.1'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.0.10'
implementation 'com.tangem:blockchain:1.106.0'
implementation 'com.tangem:blockchain:1.108.0'
implementation 'com.tangem:core:1.80.0'
implementation 'com.tangem:sdk:1.80.0'

View file

@ -2,7 +2,7 @@ package com.tangem.tap
object TapConfig {
const val usePayId: Boolean = true
const val useTopUp: Boolean = true
const val useTopUp: Boolean = false
const val coinMarketCapKey = "f6622117-c043-47a0-8975-9d673ce484de"
const val moonPayApiKey = "pk_test_kc90oYTANy7UQdBavDKGfL4K9l6VEPE"
const val moonPayApiSecretKey = "sk_test_V8w4M19LbDjjYOt170s0tGuvXAgyEb1C"

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
}