Updated on 2026-08-14

This commit is contained in:
Tangem 2022-11-02 11:28:38 +04:00
parent c7b4762753
commit 68c65e668b
2 changed files with 3 additions and 1 deletions

View file

@ -165,6 +165,7 @@ private fun handleAction(action: Action, appState: () -> AppState?, dispatch: Di
}
is GlobalAction.ScanCard -> {
scope.launch {
tangemSdkManager.changeDisplayedCardIdNumbersCount(null)
val result = tangemSdkManager.scanProduct(
store.state.globalState.analyticsHandler,
userTokensRepository,

View file

@ -182,8 +182,9 @@ class TangemSdkManager(private val tangemSdk: TangemSdk, private val context: Co
return withContext(Dispatchers.Main) { result }
}
fun changeDisplayedCardIdNumbersCount(scanResponse: ScanResponse) {
fun changeDisplayedCardIdNumbersCount(scanResponse: ScanResponse?) {
tangemSdk.config.cardIdDisplayFormat = when {
scanResponse == null -> CardIdDisplayFormat.Full
scanResponse.isTangemTwins() -> CardIdDisplayFormat.LastLuhn(4)
scanResponse.isSaltPay() -> CardIdDisplayFormat.None
else -> CardIdDisplayFormat.Full