Merge #908: gui(daemon): fix rbfpsbt params for external daemon

5c06eef586ebd540f14f3ded4d3639dcbcfb0209 gui(daemon): fix rbfpsbt params for external daemon (jp1ac4)

Pull request description:

  The `is_cancel` parameter gives an "invalid parameter" error when converted to string.

  The `feerate_vb` parameter should only be passed if it has a value as otherwise it gives an "invalid parameter" error.

ACKs for top commit:
  edouardparis:
    utACK 5c06eef586ebd540f14f3ded4d3639dcbcfb0209

Tree-SHA512: 73d192186ffac19c560cf7dd0aef8ae5c276bc6ff09852d7b1bc59aa23fe9f980c11e53654fc20fdc41ab2fee9f4433a91591c869ba0aebade8f2febce2121b5
This commit is contained in:
edouardparis 2024-01-15 14:40:41 +01:00
commit 3076d2d322
No known key found for this signature in database
GPG Key ID: E65F7A089C20DC8F

View File

@ -102,14 +102,11 @@ impl<C: Client + Debug> Daemon for Lianad<C> {
is_cancel: bool,
feerate_vb: Option<u64>,
) -> Result<CreateSpendResult, DaemonError> {
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> {