Skip to content

Commit

Permalink
Merge #908: gui(daemon): fix rbfpsbt params for external daemon
Browse files Browse the repository at this point in the history
5c06eef 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 5c06eef

Tree-SHA512: 73d192186ffac19c560cf7dd0aef8ae5c276bc6ff09852d7b1bc59aa23fe9f980c11e53654fc20fdc41ab2fee9f4433a91591c869ba0aebade8f2febce2121b5
  • Loading branch information
edouardparis committed Jan 15, 2024
2 parents 501dce4 + 5c06eef commit 3076d2d
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions gui/src/daemon/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down

0 comments on commit 3076d2d

Please sign in to comment.