From 9619c834bb22f129c72cc311461c7b1e21a5b728 Mon Sep 17 00:00:00 2001 From: yse Date: Tue, 26 Mar 2024 01:43:35 +0100 Subject: [PATCH] feat: reflect changes in cli --- cli/src/commands.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cli/src/commands.rs b/cli/src/commands.rs index 835b30f34..667ee1a5a 100644 --- a/cli/src/commands.rs +++ b/cli/src/commands.rs @@ -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 { @@ -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 => {