From 5c06eef586ebd540f14f3ded4d3639dcbcfb0209 Mon Sep 17 00:00:00 2001 From: jp1ac4 <121959000+jp1ac4@users.noreply.github.com> Date: Mon, 8 Jan 2024 15:40:24 +0000 Subject: [PATCH] gui(daemon): fix rbfpsbt params for external daemon --- gui/src/daemon/client/mod.rs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/gui/src/daemon/client/mod.rs b/gui/src/daemon/client/mod.rs index 6d33695c7..e34f8ed5c 100644 --- a/gui/src/daemon/client/mod.rs +++ b/gui/src/daemon/client/mod.rs @@ -102,14 +102,11 @@ impl Daemon for Lianad { is_cancel: bool, feerate_vb: Option, ) -> Result { - self.call( - "rbfpsbt", - Some(vec![ - json!(txid.to_string()), - json!(is_cancel.to_string()), - json!(feerate_vb), - ]), - ) + let mut input = vec![json!(txid.to_string()), json!(is_cancel)]; + if let Some(feerate_vb) = feerate_vb { + input.push(json!(feerate_vb)); + } + self.call("rbfpsbt", Some(input)) } fn update_spend_tx(&self, psbt: &Psbt) -> Result<(), DaemonError> {