diff --git a/app/build.gradle b/app/build.gradle index 8d4485d03b..2ce9b450b9 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -38,7 +38,7 @@ android { } debug_beta { initWith release - debuggable false + debuggable true versionNameSuffix "-beta" applicationIdSuffix ".debug" buildConfigField 'String', 'CONFIG_ENVIRONMENT', '\"prod\"' @@ -80,8 +80,8 @@ dependencies { coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5' implementation 'com.tangem:blockchain:develop-64' - implementation 'com.tangem.tangem-sdk-kotlin:core:develop-134' - implementation 'com.tangem.tangem-sdk-kotlin:android:develop-134' + implementation 'com.tangem.tangem-sdk-kotlin:core:develop-137' + implementation 'com.tangem.tangem-sdk-kotlin:android:develop-137' // WebView implementation "androidx.browser:browser:1.3.0" diff --git a/app/src/main/java/com/tangem/tap/features/wallet/redux/middlewares/WalletMiddleware.kt b/app/src/main/java/com/tangem/tap/features/wallet/redux/middlewares/WalletMiddleware.kt index 088fe72d40..379008a18b 100644 --- a/app/src/main/java/com/tangem/tap/features/wallet/redux/middlewares/WalletMiddleware.kt +++ b/app/src/main/java/com/tangem/tap/features/wallet/redux/middlewares/WalletMiddleware.kt @@ -11,6 +11,7 @@ import com.tangem.common.CompletionResult import com.tangem.common.core.TangemSdkError import com.tangem.common.extensions.isZero import com.tangem.common.services.Result +import com.tangem.operations.attestation.Attestation import com.tangem.operations.attestation.OnlineCardVerifier import com.tangem.tap.common.analytics.Analytics import com.tangem.tap.common.extensions.* @@ -147,6 +148,9 @@ class WalletMiddleware { store.dispatch(NavigationAction.PopBackTo(AppScreen.Home)) } is WalletAction.LoadCardInfo -> { + val attestationFailed = action.card.attestation.status == Attestation.Status.Failed + store.dispatchOnMain(GlobalAction.SetIfCardVerifiedOnline(!attestationFailed)) + scope.launch { val response = OnlineCardVerifier().getCardInfo( action.card.cardId, action.card.cardPublicKey @@ -156,13 +160,9 @@ class WalletMiddleware { val actionList = listOf( WalletAction.SetArtworkId(response.data.artwork?.id), WalletAction.LoadArtwork(action.card, response.data.artwork?.id), - GlobalAction.SetIfCardVerifiedOnline(response.data.passed) ) withMainContext { actionList.forEach { store.dispatch(it) } } } - is Result.Failure -> { - store.dispatchOnMain(GlobalAction.SetIfCardVerifiedOnline(false)) - } } store.dispatchOnMain(WalletAction.Warnings.CheckIfNeeded) }