mirror of
https://github.com/mimblewimble/grin.git
synced 2025-02-01 17:01:09 +03:00
parent
108bdbaa73
commit
fb7fd62c8b
2 changed files with 16 additions and 0 deletions
|
@ -62,6 +62,10 @@ pub fn client_command(client_args: &ArgMatches<'_>, global_config: GlobalConfig)
|
||||||
pub fn show_status(config: &ServerConfig, api_secret: Option<String>) {
|
pub fn show_status(config: &ServerConfig, api_secret: Option<String>) {
|
||||||
println!();
|
println!();
|
||||||
let title = format!("Grin Server Status");
|
let title = format!("Grin Server Status");
|
||||||
|
if term::stdout().is_none() {
|
||||||
|
println!("Could not open terminal");
|
||||||
|
return;
|
||||||
|
}
|
||||||
let mut t = term::stdout().unwrap();
|
let mut t = term::stdout().unwrap();
|
||||||
let mut e = term::stdout().unwrap();
|
let mut e = term::stdout().unwrap();
|
||||||
t.fg(term::color::MAGENTA).unwrap();
|
t.fg(term::color::MAGENTA).unwrap();
|
||||||
|
|
|
@ -35,6 +35,10 @@ pub fn outputs(
|
||||||
account, cur_height
|
account, cur_height
|
||||||
);
|
);
|
||||||
println!();
|
println!();
|
||||||
|
if term::stdout().is_none() {
|
||||||
|
println!("Could not open terminal");
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
let mut t = term::stdout().unwrap();
|
let mut t = term::stdout().unwrap();
|
||||||
t.fg(term::color::MAGENTA).unwrap();
|
t.fg(term::color::MAGENTA).unwrap();
|
||||||
writeln!(t, "{}", title).unwrap();
|
writeln!(t, "{}", title).unwrap();
|
||||||
|
@ -132,6 +136,10 @@ pub fn txs(
|
||||||
account, cur_height
|
account, cur_height
|
||||||
);
|
);
|
||||||
println!();
|
println!();
|
||||||
|
if term::stdout().is_none() {
|
||||||
|
println!("Could not open terminal");
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
let mut t = term::stdout().unwrap();
|
let mut t = term::stdout().unwrap();
|
||||||
t.fg(term::color::MAGENTA).unwrap();
|
t.fg(term::color::MAGENTA).unwrap();
|
||||||
writeln!(t, "{}", title).unwrap();
|
writeln!(t, "{}", title).unwrap();
|
||||||
|
@ -405,6 +413,10 @@ pub fn accounts(acct_mappings: Vec<AcctPathMapping>) {
|
||||||
pub fn tx_messages(tx: &TxLogEntry, dark_background_color_scheme: bool) -> Result<(), Error> {
|
pub fn tx_messages(tx: &TxLogEntry, dark_background_color_scheme: bool) -> Result<(), Error> {
|
||||||
let title = format!("Transaction Messages - Transaction '{}'", tx.id,);
|
let title = format!("Transaction Messages - Transaction '{}'", tx.id,);
|
||||||
println!();
|
println!();
|
||||||
|
if term::stdout().is_none() {
|
||||||
|
println!("Could not open terminal");
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
let mut t = term::stdout().unwrap();
|
let mut t = term::stdout().unwrap();
|
||||||
t.fg(term::color::MAGENTA).unwrap();
|
t.fg(term::color::MAGENTA).unwrap();
|
||||||
writeln!(t, "{}", title).unwrap();
|
writeln!(t, "{}", title).unwrap();
|
||||||
|
|
Loading…
Reference in a new issue