Show recovery progress on `balance` and `sync --defrag`
This commit is contained in:
parent
23d1dee2da
commit
521e9bab2b
|
@ -60,6 +60,12 @@ impl Command {
|
|||
(*progress.numerator() as f64) * 100f64 / (*progress.denominator() as f64)
|
||||
);
|
||||
}
|
||||
if let Some(progress) = wallet_summary.recovery_progress() {
|
||||
println!(
|
||||
" Recovered: {:0.3}%",
|
||||
(*progress.numerator() as f64) * 100f64 / (*progress.denominator() as f64)
|
||||
);
|
||||
}
|
||||
println!(" Balance: {}", printer.format(balance.total()));
|
||||
println!(
|
||||
" Sapling Spendable: {}",
|
||||
|
|
|
@ -333,7 +333,19 @@ impl App {
|
|||
/ (*progress.denominator() as f64)
|
||||
))
|
||||
});
|
||||
[synced]
|
||||
|
||||
let recovered = wallet_summary.recovery_progress().map(|progress| {
|
||||
Span::raw(format!(
|
||||
"Recovered: {:0.3}%",
|
||||
(*progress.numerator() as f64) * 100f64
|
||||
/ (*progress.denominator() as f64)
|
||||
))
|
||||
});
|
||||
|
||||
let separator =
|
||||
(synced.is_some() && recovered.is_some()).then(|| Span::raw(" | "));
|
||||
|
||||
[synced, separator, recovered]
|
||||
})
|
||||
.flatten(),
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue