gui(cache): include sync progress
This commit is contained in:
parent
f3a136c30b
commit
62788d105c
@ -9,6 +9,7 @@ pub struct Cache {
|
||||
pub blockheight: i32,
|
||||
pub coins: Vec<Coin>,
|
||||
pub rescan_progress: Option<f64>,
|
||||
pub sync_progress: f64,
|
||||
pub last_poll_timestamp: Option<u32>,
|
||||
}
|
||||
|
||||
@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
@ -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,
|
||||
})
|
||||
},
|
||||
|
||||
@ -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()
|
||||
};
|
||||
|
||||
@ -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.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user