From 07898530c49b46a447edb0acdee1e1ce46d75f0d Mon Sep 17 00:00:00 2001 From: iliyangermanov Date: Tue, 22 Aug 2023 19:48:28 +0300 Subject: [PATCH] Fix the import feature --- app/proguard-rules.pro | 6 ++++++ .../wallet/domain/deprecated/logic/zip/ExportZipLogic.kt | 2 ++ 2 files changed, 8 insertions(+) diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index d46b30e2ab..1c4f00ff50 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -6,3 +6,9 @@ -dontwarn org.bouncycastle.jsse.** -dontwarn org.conscrypt.** -dontwarn org.openjsse.** + +# Json serialization (GSON fixes) +-keepattributes Signature +-keep class com.google.gson.reflect.TypeToken { *; } +-keep class * extends com.google.gson.reflect.TypeToken +-keep class com.google.gson.** { *; } \ No newline at end of file diff --git a/app/src/main/java/com/ivy/wallet/domain/deprecated/logic/zip/ExportZipLogic.kt b/app/src/main/java/com/ivy/wallet/domain/deprecated/logic/zip/ExportZipLogic.kt index 734d7fbb1d..6776ba4cc8 100644 --- a/app/src/main/java/com/ivy/wallet/domain/deprecated/logic/zip/ExportZipLogic.kt +++ b/app/src/main/java/com/ivy/wallet/domain/deprecated/logic/zip/ExportZipLogic.kt @@ -14,6 +14,7 @@ import com.ivy.wallet.utils.readFile import com.ivy.wallet.utils.scopedIOThread import com.ivy.wallet.utils.toEpochMilli import kotlinx.coroutines.async +import timber.log.Timber import java.io.File import java.lang.reflect.Type import java.time.Instant @@ -171,6 +172,7 @@ class ExportZipLogic( ) } catch (e: Exception) { + Timber.e("Import error: $e") ImportResult( rowsFound = 0, transactionsImported = 0,