gui(cache): include last poll timestamp
This commit is contained in:
parent
9dd737b98c
commit
f7314aa26e
@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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()
|
||||
};
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user