Updated on 2026-08-14

This commit is contained in:
Tangem 2023-08-25 15:09:00 +03:00
commit 4d02ad4439
6 changed files with 23 additions and 20 deletions

View file

@ -56,15 +56,12 @@ internal class DefaultTokensListRouter(
headerId = R.string.common_warning,
messageId = R.string.alert_manage_tokens_unsupported_message,
)
Blockchain.Chia, Blockchain.ChiaTestnet -> AppDialog.SimpleOkDialogRes(
else -> AppDialog.SimpleOkDialogRes(
headerId = R.string.common_warning,
messageId = R.string.alert_manage_tokens_unsupported_curve_message,
args = listOf(blockchain.fullName),
)
else -> null // there's no alerts for other blockchains yer
}
if (alert != null) {
store.dispatchDialogShow(alert)
}
store.dispatchDialogShow(alert)
}
}

View file

@ -342,7 +342,7 @@
<string name="reset_card_to_factory_warning_message">Я понимаю, что после выполнения этого действия у меня больше не будет доступа к текущему кошельку</string>
<string name="reset_card_with_backup_to_factory_message">Сброс к заводским настройкам приведет к полному удалению кошелька с выбранной карты. Вы не сможете восстановить текущий кошелек или использовать данную карту для восстановления кода доступа.</string>
<string name="reset_card_without_backup_to_factory_message">Сброс к заводским настройкам приведет к полному удалению кошелька с выбранной карты. Вы не сможете восстановить текущий кошелек.</string>
<string name="russian_bank_card_warning_subtitle">У вас есть карта банка другой страны или платежной системы UnionPay?</string>
<string name="russian_bank_card_warning_subtitle">У вас есть карта банка другой страны, а также вид на жительство или регистрация вне РФ?</string>
<string name="russian_bank_card_warning_title">Карты банков РФ в данный момент не принимаются</string>
<string name="save_user_wallet_agreement_access_description">Войдите в приложение и следите за своим балансом без сканирования карты</string>
<string name="save_user_wallet_agreement_access_title">Доступ в приложение</string>

View file

@ -335,8 +335,8 @@
<string name="reset_card_to_factory_warning_message">I understand that after performing this action, I will no longer have access to the current wallet</string>
<string name="reset_card_with_backup_to_factory_message">Factory Reset will completely delete the wallet from the selected card. You will not be able to restore the current wallet or use the card to recover the access code.</string>
<string name="reset_card_without_backup_to_factory_message">Factory Reset will completely delete the wallet from the selected card and remove it from the app. You will not be able to restore the current wallet.</string>
<string name="russian_bank_card_warning_subtitle">Do you have a bank card of another country or a UnionPay card?</string>
<string name="russian_bank_card_warning_title">Russian bank cards are not accepted at the moment</string>
<string name="russian_bank_card_warning_subtitle">Do you have a bank card from another country and a residence permit or registration outside the Russian Federation?</string>
<string name="russian_bank_card_warning_title">Russian bank cards are not currently accepted</string>
<string name="save_user_wallet_agreement_access_description">Log into the app and check your balance without scanning the card</string>
<string name="save_user_wallet_agreement_access_title">Access the app</string>
<string name="save_user_wallet_agreement_allow_biometrics">Allow to use biometrics</string>

View file

@ -214,6 +214,4 @@ private val excludedBlockchains = listOf(
Blockchain.Ducatus,
Blockchain.Telos, // disable in 4.9
Blockchain.TelosTestnet, // disable in 4.9
Blockchain.OctaSpace,
Blockchain.OctaSpaceTestnet,
)

View file

@ -53,18 +53,26 @@ fun CardDTO.supportedTokens(cardTypesResolver: CardTypesResolver): List<Blockcha
}
fun CardDTO.canHandleToken(blockchain: Blockchain, cardTypesResolver: CardTypesResolver): Boolean {
return this.supportedTokens(cardTypesResolver).contains(blockchain)
val isContainsBlockchain = this.supportedTokens(cardTypesResolver).contains(blockchain)
val isWalletForCurveExists =
wallets.map { it.curve }.intersect(blockchain.getSupportedCurves().toSet()).isNotEmpty()
// fixme: check for first wallets with 1 curve and remove condition
return if (cardTypesResolver.isTangemWallet() || cardTypesResolver.isWallet2()) {
// if there's no wallet on card for blockchain with given curve
isContainsBlockchain && isWalletForCurveExists
} else {
isContainsBlockchain
}
}
fun CardDTO.canHandleBlockchain(blockchain: Blockchain, cardTypesResolver: CardTypesResolver): Boolean {
val supportedBlockchains = this.supportedBlockchains(cardTypesResolver)
val isContainsBlockchain = supportedBlockchains.contains(blockchain)
return if (cardTypesResolver.isTangemWallet()) {
// specific workaround for multiwallet v1 with different curves
// cause on early created wallets there's no created bls curve wallet
// but user can recreate wallet with curve in current app version
isContainsBlockchain &&
wallets.map { it.curve }.intersect(blockchain.getSupportedCurves().toSet()).isNotEmpty()
val isContainsBlockchain = this.supportedBlockchains(cardTypesResolver).contains(blockchain)
val isWalletForCurveExists =
wallets.map { it.curve }.intersect(blockchain.getSupportedCurves().toSet()).isNotEmpty()
// fixme: check for first wallets with 1 curve and remove condition
return if (cardTypesResolver.isTangemWallet() || cardTypesResolver.isWallet2()) {
// if there's no wallet on card for blockchain with given curve
isContainsBlockchain && isWalletForCurveExists
} else {
isContainsBlockchain
}

View file

@ -80,7 +80,7 @@ okHttp-prettyLogging = "3.1.0"
# endregion Other libraries
# region Tangem
tangemBlockchainSdk = "release-app_4.10-329"
tangemBlockchainSdk = "release-app_4.10-332"
#tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds
tangemCardSdk = "release-app_4.10-292"
#tangemCardSdk = "0.0.1" # Keep it! - used for local builds