From e7df75b8e0023c02293e9fd6ed37a0b7c69866b7 Mon Sep 17 00:00:00 2001 From: chyngyz Date: Wed, 11 Oct 2023 17:58:46 +0600 Subject: [PATCH 1/3] Change Evm watch account type key in backup file --- .../bankwallet/modules/backuplocal/BackupLocalModule.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/io/horizontalsystems/bankwallet/modules/backuplocal/BackupLocalModule.kt b/app/src/main/java/io/horizontalsystems/bankwallet/modules/backuplocal/BackupLocalModule.kt index b907dc2b28f..ea78fcdaa6c 100644 --- a/app/src/main/java/io/horizontalsystems/bankwallet/modules/backuplocal/BackupLocalModule.kt +++ b/app/src/main/java/io/horizontalsystems/bankwallet/modules/backuplocal/BackupLocalModule.kt @@ -11,7 +11,7 @@ import io.horizontalsystems.tronkit.toBigInteger object BackupLocalModule { private const val MNEMONIC = "mnemonic" private const val PRIVATE_KEY = "private_key" - private const val ADDRESS = "address" + private const val ADDRESS = "evm_address" private const val SOLANA_ADDRESS = "solana_address" private const val TRON_ADDRESS = "tron_address" private const val HD_EXTENDED_LEY = "hd_extended_key" From d7690ac7b73bd96616c34f742aff00d93d92c22f Mon Sep 17 00:00:00 2001 From: chyngyz Date: Wed, 11 Oct 2023 17:59:35 +0600 Subject: [PATCH 2/3] Make 'solana_sync_source' optional in backup file --- .../modules/backuplocal/fullbackup/BackupProvider.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/horizontalsystems/bankwallet/modules/backuplocal/fullbackup/BackupProvider.kt b/app/src/main/java/io/horizontalsystems/bankwallet/modules/backuplocal/fullbackup/BackupProvider.kt index 0b23f2452ef..2ba5257b28b 100644 --- a/app/src/main/java/io/horizontalsystems/bankwallet/modules/backuplocal/fullbackup/BackupProvider.kt +++ b/app/src/main/java/io/horizontalsystems/bankwallet/modules/backuplocal/fullbackup/BackupProvider.kt @@ -255,7 +255,9 @@ class BackupProvider( blockchainSettingsStorage.save(syncSource.url, blockchainType) } - blockchainSettingsStorage.save(settings.solanaSyncSource.name, BlockchainType.Solana) + settings.solanaSyncSource?.let { + blockchainSettingsStorage.save(settings.solanaSyncSource.name, BlockchainType.Solana) + } if (settings.appIcon != (localStorage.appIcon ?: AppIcon.Main).titleText) { AppIcon.fromTitle(settings.appIcon)?.let { appIconService.setAppIcon(it) } @@ -732,7 +734,7 @@ data class Settings( @SerializedName("evm_sync_sources") val evmSyncSources: EvmSyncSources, @SerializedName("solana_sync_source") - val solanaSyncSource: SolanaSyncSource + val solanaSyncSource: SolanaSyncSource? ) sealed class RestoreException(message: String) : Exception(message) { From 9b883d2e8369dfaa450e7e4bd2ad5feacc925596 Mon Sep 17 00:00:00 2001 From: chyngyz Date: Wed, 11 Oct 2023 18:00:31 +0600 Subject: [PATCH 3/3] Make 'tokenQueryId' field lowercase, handle its parsing --- app/build.gradle | 2 +- .../bankwallet/modules/backuplocal/fullbackup/BackupProvider.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index bdd0dead572..5c1d1c3d0be 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -270,7 +270,7 @@ dependencies { implementation 'com.github.horizontalsystems:ethereum-kit-android:ddf4404' implementation 'com.github.horizontalsystems:blockchain-fee-rate-kit-android:1d3bd49' implementation 'com.github.horizontalsystems:binance-chain-kit-android:7e4d7c0' - implementation 'com.github.horizontalsystems:market-kit-android:0b065d2' + implementation 'com.github.horizontalsystems:market-kit-android:f5cb101' implementation 'com.github.horizontalsystems:solana-kit-android:5cc6e81' implementation 'com.github.horizontalsystems:tron-kit-android:67f8d53' // Zcash SDK diff --git a/app/src/main/java/io/horizontalsystems/bankwallet/modules/backuplocal/fullbackup/BackupProvider.kt b/app/src/main/java/io/horizontalsystems/bankwallet/modules/backuplocal/fullbackup/BackupProvider.kt index 2ba5257b28b..08e06722275 100644 --- a/app/src/main/java/io/horizontalsystems/bankwallet/modules/backuplocal/fullbackup/BackupProvider.kt +++ b/app/src/main/java/io/horizontalsystems/bankwallet/modules/backuplocal/fullbackup/BackupProvider.kt @@ -573,7 +573,7 @@ class BackupProvider( val tokenQuery = TokenQuery.fromId(it.tokenQueryId) ?: return@mapNotNull null val settings = settingsManager.settings(account, tokenQuery.blockchainType).values BackupLocalModule.EnabledWalletBackup( - tokenQueryId = it.tokenQueryId, + tokenQueryId = it.tokenQueryId.lowercase(), coinName = it.coinName, coinCode = it.coinCode, decimals = it.coinDecimals,