diff --git a/crates/cdk-cli/src/main.rs b/crates/cdk-cli/src/main.rs index 6462f12c..2faa9c62 100644 --- a/crates/cdk-cli/src/main.rs +++ b/crates/cdk-cli/src/main.rs @@ -34,7 +34,7 @@ struct Cli { } const DEFAULT_REDB_DB_PATH: &str = "./cashu_tool.redb"; -const DEFAULT_SQLITE_DB_PATH: &str = "./cashu_tool.redb"; +const DEFAULT_SQLITE_DB_PATH: &str = "./cashu_tool.sqlite"; #[derive(Subcommand)] enum Commands { @@ -44,8 +44,8 @@ enum Commands { Melt(sub_commands::melt::MeltSubCommand), /// Receive token Receive(sub_commands::receive::ReceiveSubCommand), - /// Create token from wallet balance - CreateToken(sub_commands::create_token::CreateTokenSubCommand), + /// Send + Send(sub_commands::send::SendSubCommand), /// Check if wallet balance is spendable CheckSpendable, /// View mint info @@ -100,8 +100,8 @@ async fn main() -> Result<()> { Commands::Receive(sub_command_args) => { sub_commands::receive::receive(wallet, sub_command_args).await } - Commands::CreateToken(sub_command_args) => { - sub_commands::create_token::create_token(wallet, sub_command_args).await + Commands::Send(sub_command_args) => { + sub_commands::send::send(wallet, sub_command_args).await } Commands::CheckSpendable => sub_commands::check_spent::check_spent(wallet).await, Commands::MintInfo(sub_command_args) => { diff --git a/crates/cdk-cli/src/sub_commands/mod.rs b/crates/cdk-cli/src/sub_commands/mod.rs index ffcc7022..c11bc139 100644 --- a/crates/cdk-cli/src/sub_commands/mod.rs +++ b/crates/cdk-cli/src/sub_commands/mod.rs @@ -1,8 +1,8 @@ pub mod check_spent; -pub mod create_token; pub mod decode_token; pub mod melt; pub mod mint; pub mod mint_info; pub mod receive; pub mod restore; +pub mod send; diff --git a/crates/cdk-cli/src/sub_commands/create_token.rs b/crates/cdk-cli/src/sub_commands/send.rs similarity index 97% rename from crates/cdk-cli/src/sub_commands/create_token.rs rename to crates/cdk-cli/src/sub_commands/send.rs index 212f120b..f359e338 100644 --- a/crates/cdk-cli/src/sub_commands/create_token.rs +++ b/crates/cdk-cli/src/sub_commands/send.rs @@ -12,7 +12,7 @@ use cdk::Amount; use clap::Args; #[derive(Args)] -pub struct CreateTokenSubCommand { +pub struct SendSubCommand { /// Token Memo #[arg(short, long)] memo: Option, @@ -33,7 +33,7 @@ pub struct CreateTokenSubCommand { refund_keys: Vec, } -pub async fn create_token(wallet: Wallet, sub_command_args: &CreateTokenSubCommand) -> Result<()> { +pub async fn send(wallet: Wallet, sub_command_args: &SendSubCommand) -> Result<()> { let mints_amounts: Vec<(UncheckedUrl, HashMap<_, _>)> = wallet.mint_balances().await?.into_iter().collect();