Skip to content

Commit

Permalink
feat: reflect changes in cli
Browse files Browse the repository at this point in the history
  • Loading branch information
yse committed Mar 27, 2024
1 parent 3fb13c7 commit 9619c83
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cli/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use rustyline::history::DefaultHistory;
use rustyline::Editor;
use rustyline::{hint::HistoryHinter, Completer, Helper, Hinter, Validator};

use breez_sdk_liquid::{ReceivePaymentRequest, Wallet};
use breez_sdk_liquid::{ReceivePaymentRequest, SendPaymentResponse, Wallet};

#[derive(Parser, Debug, Clone, PartialEq)]
pub(crate) enum Command {
Expand Down Expand Up @@ -61,13 +61,14 @@ pub(crate) fn handle_command(
))
}
Command::SendPayment { bolt11 } => {
let response = wallet.send_payment(&bolt11)?;
let prepare_response = wallet.prepare_payment(&bolt11)?;
let SendPaymentResponse { txid } = wallet.send_payment(&prepare_response)?;

Ok(format!(
r#"
Successfully paid the invoice!
You can view the onchain transaction at https://blockstream.info/liquidtestnet/tx/{}"#,
response.txid
txid
))
}
Command::GetInfo => {
Expand Down

0 comments on commit 9619c83

Please sign in to comment.