Have the wallet provide the Monero height for is_confirmed

This commit is contained in:
Luke Parker
2022-10-15 21:07:37 -04:00
parent 826e27c80e
commit 245dcc6083

View File

@@ -234,6 +234,11 @@ impl<D: CoinDb, C: Coin> Wallet<D, C> {
self.coin.address(self.keys[self.keys.len() - 1].0.group_key())
}
// TODO: Remove
pub async fn is_confirmed(&mut self, tx: &[u8]) -> Result<bool, CoinError> {
self.coin.is_confirmed(tx, self.scanned_height + C::CONFIRMATIONS)
}
pub async fn poll(&mut self) -> Result<(), CoinError> {
if self.coin.get_height().await? < C::CONFIRMATIONS {
return Ok(());