chore(cli): reduce log level

This commit is contained in:
thesimplekid
2024-06-29 09:34:11 +01:00
parent 5db6eaa858
commit a710bae212
4 changed files with 6 additions and 10 deletions

View File

@@ -66,7 +66,7 @@ enum Commands {
#[tokio::main] #[tokio::main]
async fn main() -> Result<()> { async fn main() -> Result<()> {
tracing_subscriber::fmt() tracing_subscriber::fmt()
.with_max_level(tracing::Level::INFO) .with_max_level(tracing::Level::WARN)
.init(); .init();
// Parse input // Parse input

View File

@@ -1,5 +1,4 @@
use std::collections::HashMap; use std::collections::HashMap;
use std::println;
use anyhow::Result; use anyhow::Result;
use cdk::url::UncheckedUrl; use cdk::url::UncheckedUrl;

View File

@@ -20,7 +20,7 @@ pub async fn melt(
) -> Result<()> { ) -> Result<()> {
let mints_amounts = mint_balances(wallets).await?; let mints_amounts = mint_balances(wallets).await?;
println!("Enter mint number to create token"); println!("Enter mint number to melt from");
let mut user_input = String::new(); let mut user_input = String::new();
let stdin = io::stdin(); let stdin = io::stdin();
@@ -54,10 +54,7 @@ pub async fn melt(
println!("{:?}", quote); println!("{:?}", quote);
let melt = wallet let melt = wallet.melt(&quote.id, SplitTarget::default()).await?;
.melt(&quote.id, SplitTarget::default())
.await
.unwrap();
println!("Paid invoice: {}", melt.state); println!("Paid invoice: {}", melt.state);
if let Some(preimage) = melt.preimage { if let Some(preimage) = melt.preimage {

View File

@@ -1,7 +1,7 @@
use std::collections::HashMap; use std::collections::HashMap;
use std::io;
use std::io::Write; use std::io::Write;
use std::str::FromStr; use std::str::FromStr;
use std::{io, println};
use anyhow::{bail, Result}; use anyhow::{bail, Result};
use cdk::amount::SplitTarget; use cdk::amount::SplitTarget;
@@ -26,10 +26,10 @@ pub struct SendSubCommand {
/// Locktime before refund keys can be used /// Locktime before refund keys can be used
#[arg(short, long)] #[arg(short, long)]
locktime: Option<u64>, locktime: Option<u64>,
/// Publey to lock proofs to /// Pubkey to lock proofs to
#[arg(short, long, action = clap::ArgAction::Append)] #[arg(short, long, action = clap::ArgAction::Append)]
pubkey: Vec<String>, pubkey: Vec<String>,
/// Publey to lock proofs to /// Refund keys that can be used after locktime
#[arg(long, action = clap::ArgAction::Append)] #[arg(long, action = clap::ArgAction::Append)]
refund_keys: Vec<String>, refund_keys: Vec<String>,
} }