feat: pending mints

This commit is contained in:
thesimplekid
2024-06-09 18:00:24 +01:00
parent 7c4c24d0b7
commit ea05cc37a3
3 changed files with 13 additions and 0 deletions

View File

@@ -44,6 +44,8 @@ enum Commands {
Balance,
/// Pay bolt11 invoice
Melt(sub_commands::melt::MeltSubCommand),
/// Claim pending mints
PendingMint,
/// Receive token
Receive(sub_commands::receive::ReceiveSubCommand),
/// Send
@@ -115,6 +117,7 @@ async fn main() -> Result<()> {
Commands::Mint(sub_command_args) => {
sub_commands::mint::mint(wallet, sub_command_args).await
}
Commands::PendingMint => sub_commands::pending_mints::pending_mints(wallet).await,
Commands::Burn(sub_command_args) => {
sub_commands::burn::burn(wallet, sub_command_args).await
}

View File

@@ -5,6 +5,7 @@ pub mod decode_token;
pub mod melt;
pub mod mint;
pub mod mint_info;
pub mod pending_mints;
pub mod receive;
pub mod restore;
pub mod send;

View File

@@ -0,0 +1,9 @@
use anyhow::Result;
use cdk::wallet::Wallet;
pub async fn pending_mints(wallet: Wallet) -> Result<()> {
let amount_claimed = wallet.check_all_mint_quotes().await?;
println!("Amount minted: {amount_claimed}");
Ok(())
}