Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backup fixes #6724

Merged
merged 3 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) }
Expand Down Expand Up @@ -571,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,
Expand Down Expand Up @@ -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) {
Expand Down