Updated on 2026-08-14

This commit is contained in:
Tangem 2024-10-18 17:28:32 +03:00
commit a48fdfa05e
22 changed files with 68 additions and 31 deletions

View file

@ -19,8 +19,8 @@ import com.tangem.domain.models.scan.CardDTO.Companion.RING_BATCH_IDS
import com.tangem.domain.models.scan.CardDTO.Companion.RING_BATCH_PREFIX
import com.tangem.domain.models.scan.ScanResponse
import com.tangem.domain.wallets.builder.UserWalletBuilder
import com.tangem.domain.wallets.legacy.UserWalletsListManager
import com.tangem.domain.wallets.builder.UserWalletIdBuilder
import com.tangem.domain.wallets.legacy.UserWalletsListManager
import com.tangem.domain.wallets.models.Artwork
import com.tangem.domain.wallets.models.UserWallet
import com.tangem.feature.onboarding.data.model.CreateWalletResponse
@ -641,6 +641,8 @@ private fun handleBackupAction(appState: () -> AppState?, action: BackupAction)
)
}
} else {
delay(HIDE_PROGRESS_DELAY)
readCard { newScanResponse ->
scanResponse = newScanResponse
userWallet = createUserWallet(newScanResponse, backupState)

View file

@ -308,7 +308,7 @@
<string name="give_permission_unlimited">Unbegrenzt</string>
<string name="home_button_order">Karte oder Ring bestellen</string>
<string name="home_button_scan">Karte oder Ring scannen</string>
<string name="information_generated_with_ai">Diese Informationen wurden mithilfe von KI generiert. \n Tippe hier, wenn Du Fehler finden.</string>
<string name="information_generated_with_ai">Diese Informationen wurden mithilfe von KI generiert.\n Tippe hier, wenn Du Fehler finden.</string>
<string name="initial_message_change_access_code_body">Um den Zugangscode zu ändern, halte die Karte oder Ring wie oben gezeigt an das Gerät und entferne sie erst am Ende des Vorgangs.</string>
<string name="initial_message_change_passcode_body">Um den Passcode zu ändern, halte die Karte oder Ring wie oben gezeigt an das Gerät und entferne sie erst am Ende des Vorgangs.</string>
<string name="initial_message_create_wallet_body">Um die Wallet zu erstellen, halte die Karte oder Ring wie oben gezeigt an das Gerät und entferne sie erst am Ende des Vorgangs.</string>
@ -391,8 +391,8 @@
<string name="markets_sort_by_trending_title">Beliebt</string>
<string name="markets_token_details_about_token_title">Über %s</string>
<plurals name="markets_token_details_amount_exchanges">
<item quantity="one">%d Börse</item>
<item quantity="other">%d Börsen</item>
<item quantity="one">%d börse</item>
<item quantity="other">%d börsen</item>
</plurals>
<plurals name="markets_token_details_based_on_ratings">
<item quantity="one">Bewertung, basierend auf %d</item>

View file

@ -308,7 +308,7 @@
<string name="give_permission_unlimited">Ilimitado</string>
<string name="home_button_order">Ordenar </string>
<string name="home_button_scan">Escanee</string>
<string name="information_generated_with_ai">Esta información fue generada con IA</string>
<string name="information_generated_with_ai">Esta información fue generada con IA.\nPulse aquí si encuentra algún error.</string>
<string name="initial_message_change_access_code_body">Toque para cambiar la contraseña</string>
<string name="initial_message_change_passcode_body">Toque para cambiar la contraseña</string>
<string name="initial_message_create_wallet_body">Para crear la billetera, toque la tarjeta como se muestra arriba y no la retire hasta el final de la operación</string>
@ -391,8 +391,8 @@
<string name="markets_sort_by_trending_title">Tendencias</string>
<string name="markets_token_details_about_token_title">Acerca de %s</string>
<plurals name="markets_token_details_amount_exchanges">
<item quantity="one">intercambio</item>
<item quantity="other">intercambios</item>
<item quantity="one">%d intercambio</item>
<item quantity="other">%d intercambios</item>
</plurals>
<plurals name="markets_token_details_based_on_ratings">
<item quantity="one">Basado en %d evaluación </item>
@ -882,6 +882,7 @@
<string name="wallet_connect_create_tx_message">Solicitud para crear una transacción para %1$s\n%2$s\n\nMontante: %3$s\nComisión: %4$s\nTotal: %5$s\nSaldo: %6$s</string>
<string name="wallet_connect_create_tx_not_enough_funds">No se puede completar la transacción. Fondos insuficientes.</string>
<string name="wallet_connect_error_failed_to_connect">Error al establecer la sesión de WalletConnect. Por favor, inténtelo más tarde.</string>
<string name="wallet_connect_error_missing_blockchains">No todos los tokens se han agregado a su lista. Añádelos primero y vuelve a intentarlo. Tokens faltantes :\n</string>
<string name="wallet_connect_error_sing_failed">Error al firmar el mensaje.\nPor favor, inténtalo de nuevo</string>
<string name="wallet_connect_error_timeout">Error al establecer la sesión de WalletConnect: error de tiempo de espera. Por favor, inténtelo más tarde.</string>
<string name="wallet_connect_error_unsupported_blockchains">La solicitud de sesión contiene blockchains no compatibles para la conexión WalletConnect. Blockchains no compatibles:\n</string>

View file

@ -308,7 +308,7 @@
<string name="give_permission_unlimited">Illimité</string>
<string name="home_button_order">Commandez</string>
<string name="home_button_scan">Scannez</string>
<string name="information_generated_with_ai">Ces informations ont été générées avec l\'IA</string>
<string name="information_generated_with_ai">Ces informations ont été générées avec l\'IA.\nAppuyez ici si vous trouvez des erreurs.</string>
<string name="initial_message_change_access_code_body">Touchez, pour modifier le code d\'accès</string>
<string name="initial_message_change_passcode_body">Touchez, pour modifier le mot de passe</string>
<string name="initial_message_create_wallet_body">Pour créer le portefeuille, appuyez sur la carte comme indiqué ci-dessus et ne la retirez pas jusqu\'à la fin de l\'opération</string>
@ -391,8 +391,8 @@
<string name="markets_sort_by_trending_title">Tendances</string>
<string name="markets_token_details_about_token_title">À propos de %s</string>
<plurals name="markets_token_details_amount_exchanges">
<item quantity="one">échange</item>
<item quantity="other">échanges</item>
<item quantity="one">%d échange</item>
<item quantity="other">%d échanges</item>
</plurals>
<plurals name="markets_token_details_based_on_ratings">
<item quantity="one">Basé sur %d évaluation</item>
@ -882,6 +882,7 @@
<string name="wallet_connect_create_tx_message">Demande de création d\'une transaction pour %1$s\n%2$s\n\nMontant : %3$s\nFrais : %4$s\nTotal : %5$s\nSolde : %6$s</string>
<string name="wallet_connect_create_tx_not_enough_funds">Impossible d\'effectuer la transaction. Fonds insuffisants.</string>
<string name="wallet_connect_error_failed_to_connect">Échec de l\'établissement de la session WalletConnect. Veuillez réessayer plus tard.</string>
<string name="wallet_connect_error_missing_blockchains">Tous les jetons n\'ont pas été ajoutés à votre liste. Veuillez d\'abord les ajouter et essayez à nouveau. Jetons manquants :\n</string>
<string name="wallet_connect_error_sing_failed">Échec de la signature du message. Veuillez réessayer</string>
<string name="wallet_connect_error_timeout">Échec de l\'établissement de la session WalletConnect : erreur de délai d\'attente. Veuillez réessayer plus tard.</string>
<string name="wallet_connect_error_unsupported_blockchains">La demande de session contient des blockchains non prises en charge pour la connexion WalletConnect. Blockchains non prises en charge :\n</string>

View file

@ -82,10 +82,12 @@
<string name="common_buy_currency">%1$sへ移動</string>
<string name="common_camera_denied_alert_message">カメラへのアクセスを許可していません。プライバシー設定を調整してください。</string>
<string name="common_cancel">キャンセル</string>
<string name="common_change">変更</string>
<string name="common_choose_action">アクションを選択</string>
<string name="common_claim">請求</string>
<string name="common_claim_rewards">報酬を受け取る</string>
<string name="common_close">閉じる</string>
<string name="common_confirm">確認</string>
<string name="common_continue">続ける</string>
<string name="common_copy">コピー</string>
<string name="common_copy_address">アドレスをコピー</string>
@ -542,6 +544,9 @@
<string name="onboarding_wallet_info_title_fourth">アクセスコードの復元</string>
<string name="onboarding_wallet_info_title_second">同一のカード</string>
<string name="onboarding_wallet_info_title_third">アクセスコード</string>
<string name="onramp_residency_bottomsheet_country_not_supported">この国では当社のサービスはご利用いただけません</string>
<string name="onramp_residency_bottomsheet_country_subtitle">変更または確認</string>
<string name="onramp_residency_bottomsheet_title">あなたの住居は次のように識別されています</string>
<string name="organize_tokens_group">グループ</string>
<string name="organize_tokens_sort_by_balance">残高順</string>
<string name="organize_tokens_title">トークンを整理する</string>
@ -746,7 +751,7 @@
<string name="staking_reward_schedule_each">%sごと</string>
<string name="staking_reward_schedule_each_day">毎日</string>
<string name="staking_reward_schedule_each_days">%s日ごと</string>
<string name="staking_reward_schedule_each_plural">%1$s</string>
<string name="staking_reward_schedule_each_plural"></string>
<string name="staking_reward_schedule_epoch">エポック毎</string>
<string name="staking_reward_schedule_era">時代毎</string>
<string name="staking_reward_schedule_hour">毎時間</string>
@ -872,6 +877,7 @@
<string name="wallet_connect_create_tx_message">%1$sの取引を作成するリクエスト\n%2$s\n\n金額: %3$s\n手数料: %4$s\n合計: %5$s\n残高: %6$s</string>
<string name="wallet_connect_create_tx_not_enough_funds">取引を送信できません。資金が足りません。</string>
<string name="wallet_connect_error_failed_to_connect">WalletConnect セッションを確立できませんでした。しばらくしてからもう一度お試しください。</string>
<string name="wallet_connect_error_missing_blockchains">すべてのトークンがリストには追加されませんでした。まず追加してから、もう一度お試しください。不足しているトークン: \n</string>
<string name="wallet_connect_error_sing_failed">メッセージの署名に失敗しました。\nもう一度お試しください。</string>
<string name="wallet_connect_error_timeout">WalletConnectセッションの確立に失敗しましたタイムアウトエラー。しばらくしてもう一度お試しください。</string>
<string name="wallet_connect_error_unsupported_blockchains">セッションリクエストには、WalletConnect接続でサポートされていないブロックチェーンが含まれています。サポートされていないブロックチェーン: \n</string>

View file

@ -89,6 +89,7 @@
<string name="common_claim">Получить</string>
<string name="common_claim_rewards">Вывести награду</string>
<string name="common_close">Закрыть</string>
<string name="common_confirm">Подтвердить</string>
<string name="common_continue">Продолжить</string>
<string name="common_copy">Копировать</string>
<string name="common_copy_address">Скопировать адрес</string>
@ -518,7 +519,7 @@
</plurals>
<string name="onboarding_seed_generate_title">Ваша seed-фраза</string>
<plurals name="onboarding_seed_generate_words_count">
<item quantity="one">%d слово</item>
<item quantity="one"></item>
<item quantity="few">%d слова</item>
<item quantity="many">%d слов</item>
<item quantity="other">%d слов</item>

View file

@ -519,7 +519,7 @@
</plurals>
<string name="onboarding_seed_generate_title">Ваша seed-фраза</string>
<plurals name="onboarding_seed_generate_words_count">
<item quantity="one">%d слово</item>
<item quantity="one"></item>
<item quantity="few">%d слова</item>
<item quantity="many">%d слів</item>
<item quantity="other">%d слів</item>

View file

@ -83,10 +83,12 @@
<string name="common_buy_currency">Go to %1$s</string>
<string name="common_camera_denied_alert_message">You have not given access to your camera, please adjust your privacy settings</string>
<string name="common_cancel">Cancel</string>
<string name="common_change">Change</string>
<string name="common_choose_action">Choose action</string>
<string name="common_claim">Claim</string>
<string name="common_claim_rewards">Claim rewards</string>
<string name="common_close">Close</string>
<string name="common_confirm">Confirm</string>
<string name="common_continue">Continue</string>
<string name="common_copy">Copy</string>
<string name="common_copy_address">Copy address</string>
@ -550,6 +552,9 @@
<string name="onboarding_wallet_info_title_fourth">Access code restore</string>
<string name="onboarding_wallet_info_title_second">Identical cards</string>
<string name="onboarding_wallet_info_title_third">Access code</string>
<string name="onramp_residency_bottomsheet_country_not_supported">Our services are not available in this country</string>
<string name="onramp_residency_bottomsheet_country_subtitle">Change or confirm it</string>
<string name="onramp_residency_bottomsheet_title">Your residence has been identified as</string>
<string name="organize_tokens_group">Group</string>
<string name="organize_tokens_sort_by_balance">By balance</string>
<string name="organize_tokens_title">Organize tokens</string>

View file

@ -42,7 +42,8 @@ class InvalidatePendingTransactionsUseCase(
newBalancesId: Int,
pendingData: List<Pair<PendingTransaction, BalanceItem>>,
): Pair<List<BalanceItem>, List<PendingTransaction>> {
val balances = realData.associateBy { BalanceIdentity(it.groupId, it.type, it.amount, it.date) }
val balances = realData.groupBy { BalanceIdentity(it.groupId, it.type, it.amount, it.date) }
.mapValues { it.value.toMutableList() }
.toMutableMap()
val transactionsToRemove = mutableListOf<PendingTransaction>()
@ -56,28 +57,34 @@ class InvalidatePendingTransactionsUseCase(
transactionsToRemove.add(pendingTransaction)
}
balances.containsKey(key) -> {
balances[key] = balanceItem
val removed = balances[key]?.removeIf { !it.isPending } ?: false
if (removed) {
balances[key]?.add(balanceItem)
}
}
else -> {
val groupId = UUID.randomUUID().toString()
val now = DateTime.now()
balances[BalanceIdentity(groupId, BalanceType.STAKED, pendingTransaction.amount, now)] =
BalanceItem(
groupId = groupId,
type = pendingTransaction.type,
amount = pendingTransaction.amount,
rawCurrencyId = pendingTransaction.rawCurrencyId,
validatorAddress = pendingTransaction.validator?.address,
date = null,
pendingActions = emptyList(),
token = pendingTransaction.token,
isPending = true,
mutableListOf(
BalanceItem(
groupId = groupId,
type = pendingTransaction.type,
amount = pendingTransaction.amount,
rawCurrencyId = pendingTransaction.rawCurrencyId,
validatorAddress = pendingTransaction.validator?.address,
date = null,
pendingActions = emptyList(),
token = pendingTransaction.token,
isPending = true,
),
)
balances.entries.find {
it.key.type == BalanceType.STAKED &&
it.key.amount == pendingTransaction.amount &&
!it.value.isPending
!it.value.any { it.isPending }
}
?.key
?.let { balances.remove(it) }
@ -85,7 +92,7 @@ class InvalidatePendingTransactionsUseCase(
}
}
return balances.values.toList() to transactionsToRemove
return balances.values.flatten() to transactionsToRemove
}
private data class BalanceIdentity(

View file

@ -154,7 +154,7 @@ internal sealed class StakingAnalyticsEvents(
event = "Errors",
params = mapOf(
AnalyticsParam.TOKEN_PARAM to token,
AnalyticsParam.ERROR_DESCRIPTION to errorType,
"ErrorType" to errorType,
),
)

View file

@ -236,7 +236,9 @@ internal class SetInitialDataStateTransformer(
}
private fun getAprRange(validators: List<Yield.Validator>): TextReference {
val aprValues = validators.mapNotNull { it.apr }
val aprValues = validators
.filter { it.preferred }
.mapNotNull { it.apr }
val minApr = aprValues.min()
val maxApr = aprValues.max()

View file

@ -52,7 +52,7 @@ internal class ShowApprovalBottomSheetTransformer(
data = GiveTxPermissionState.ReadyForRequest(
currency = cryptoCurrency.symbol,
amount = amountState.amountTextField.value,
approveType = ApproveType.LIMITED,
approveType = ApproveType.UNLIMITED,
walletAddress = walletAddress,
spenderAddress = validatorAddress,
fee = resourceReference(

View file

@ -37,6 +37,12 @@ internal enum class Wallet2CobrandImage(
batchIds = setOf("AF09"),
),
BitcoinGold(
cards2ResId = R.drawable.ill_bitcoingold_card2_120_106,
cards3ResId = R.drawable.ill_bitcoingold_card3_120_106,
batchIds = setOf("AF71"),
),
BitcoinPizzaDay(
cards2ResId = R.drawable.ill_pizza_day_card2_120_106,
cards3ResId = R.drawable.ill_pizza_day_card3_120_106,
@ -91,6 +97,12 @@ internal enum class Wallet2CobrandImage(
batchIds = setOf("AF31"),
),
Kaspa3(
cards2ResId = R.drawable.ill_kaspa3_card2_120_106,
cards3ResId = R.drawable.ill_kaspa3_card3_120_106,
batchIds = setOf("AF73"),
),
KishuInu(
cards2ResId = R.drawable.ill_kishu_inu_card2_120_106,
cards3ResId = R.drawable.ill_kishu_inu_card3_120_106,

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View file

@ -89,7 +89,7 @@ markdownComposeView = "0.5.4"
# endregion Other libraries
# region Tangem
tangemBlockchainSdk = "release-app_5.17-827"
tangemBlockchainSdk = "release-app_5.17-828"
#tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds
tangemCardSdk = "release-app_5.17-392"
#tangemCardSdk = "0.0.1" # Keep it! - used for local builds ^