diff --git a/gui/src/app/cache.rs b/gui/src/app/cache.rs index 1ab235a4..b4c54e30 100644 --- a/gui/src/app/cache.rs +++ b/gui/src/app/cache.rs @@ -9,6 +9,7 @@ pub struct Cache { pub blockheight: i32, pub coins: Vec, pub rescan_progress: Option, + pub sync_progress: f64, pub last_poll_timestamp: Option, } @@ -21,6 +22,7 @@ impl std::default::Default for Cache { blockheight: 0, coins: Vec::new(), rescan_progress: None, + sync_progress: 1.0, last_poll_timestamp: None, } } diff --git a/gui/src/app/mod.rs b/gui/src/app/mod.rs index 92386340..aaf5e8f1 100644 --- a/gui/src/app/mod.rs +++ b/gui/src/app/mod.rs @@ -282,6 +282,7 @@ impl App { network: info.network, blockheight: info.block_height, rescan_progress: info.rescan_progress, + sync_progress: info.sync, last_poll_timestamp: info.last_poll_timestamp, }) }, diff --git a/gui/src/loader.rs b/gui/src/loader.rs index a7de1c19..db667176 100644 --- a/gui/src/loader.rs +++ b/gui/src/loader.rs @@ -380,6 +380,7 @@ pub async fn load_application( network: info.network, blockheight: info.block_height, coins, + sync_progress: info.sync, last_poll_timestamp: info.last_poll_timestamp, ..Default::default() }; diff --git a/gui/src/main.rs b/gui/src/main.rs index 7aac5a0a..74b6cc85 100644 --- a/gui/src/main.rs +++ b/gui/src/main.rs @@ -459,6 +459,7 @@ pub fn create_app_with_remote_backend( network, coins: Vec::new(), rescan_progress: None, + sync_progress: 1.0, // Remote backend is always synced datadir_path: datadir.clone(), blockheight: wallet.tip_height.unwrap_or(0), last_poll_timestamp: None, // We ignore this field for remote backend.