gui(cache): include last poll timestamp

This commit is contained in:
Michael Mallan 2024-10-10 13:12:38 +01:00
parent 9dd737b98c
commit f7314aa26e
No known key found for this signature in database
GPG Key ID: 5177CDCEDB0EABEB
4 changed files with 5 additions and 0 deletions

View File

@ -9,6 +9,7 @@ pub struct Cache {
pub blockheight: i32,
pub coins: Vec<Coin>,
pub rescan_progress: Option<f64>,
pub last_poll_timestamp: Option<u32>,
}
/// only used for tests.
@ -20,6 +21,7 @@ impl std::default::Default for Cache {
blockheight: 0,
coins: Vec::new(),
rescan_progress: None,
last_poll_timestamp: None,
}
}
}

View File

@ -281,6 +281,7 @@ impl App {
network: info.network,
blockheight: info.block_height,
rescan_progress: info.rescan_progress,
last_poll_timestamp: info.last_poll_timestamp,
})
},
Message::UpdateCache,

View File

@ -380,6 +380,7 @@ pub async fn load_application(
network: info.network,
blockheight: info.block_height,
coins,
last_poll_timestamp: info.last_poll_timestamp,
..Default::default()
};

View File

@ -461,6 +461,7 @@ pub fn create_app_with_remote_backend(
rescan_progress: None,
datadir_path: datadir.clone(),
blockheight: wallet.tip_height.unwrap_or(0),
last_poll_timestamp: None, // We ignore this field for remote backend.
},
Arc::new(
Wallet::new(wallet.descriptor)