From 1e13d4124523cb1d8347291bd7f5c44fcf98917d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Mon, 11 Apr 2022 10:48:46 +0200 Subject: [PATCH] wallet: make config file version optional --- nym-wallet/src-tauri/src/config/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nym-wallet/src-tauri/src/config/mod.rs b/nym-wallet/src-tauri/src/config/mod.rs index 71012940f6..7510d80612 100644 --- a/nym-wallet/src-tauri/src/config/mod.rs +++ b/nym-wallet/src-tauri/src/config/mod.rs @@ -42,13 +42,13 @@ struct Base { #[derive(Debug, Deserialize, Serialize, Clone, PartialEq, Eq)] pub struct GlobalConfig { - version: u32, + version: Option, // TODO: there are no global settings (yet) } #[derive(Debug, Deserialize, Serialize, Clone, PartialEq, Eq)] pub struct NetworkConfig { - version: u32, + version: Option, // User selected urls selected_nymd_url: Option, @@ -71,7 +71,7 @@ impl Default for Base { impl Default for GlobalConfig { fn default() -> Self { Self { - version: CURRENT_GLOBAL_CONFIG_VERSION, + version: Some(CURRENT_GLOBAL_CONFIG_VERSION), } } } @@ -79,7 +79,7 @@ impl Default for GlobalConfig { impl Default for NetworkConfig { fn default() -> Self { Self { - version: CURRENT_NETWORK_CONFIG_VERSION, + version: Some(CURRENT_NETWORK_CONFIG_VERSION), selected_nymd_url: None, selected_api_url: None, validator_urls: None,