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> {