]> Untitled Git - bdk/commitdiff
Merge bitcoindevkit/bdk#1768: refactor(wallet): cleanup and remove unused code in...
authorSteve Myers <steve@notmandatory.org>
Mon, 23 Dec 2024 19:56:03 +0000 (13:56 -0600)
committerSteve Myers <steve@notmandatory.org>
Mon, 23 Dec 2024 20:00:37 +0000 (14:00 -0600)
a2f7a8be149e4a420519dbe072927faeb7f92514 refactor(wallet): cleanup and remove unused code in create_tx (Steve Myers)

Pull request description:

  ### Description

  Cleanup and remove unused code in `Wallet::create_tx`, this was noticed during review of #1763. See: https://github.com/bitcoindevkit/bdk/pull/1763#discussion_r1876740140

  fixes #1710

  ### Notes to the reviewers

  In addition to removing the unneeded assignments to `fee_amount` and `received` I also refactored creation of the change output to be an `if let` instead of `match` statement since it only needs to do something if there is `Excess::Change`.

  I should have done this cleanup as part of #1048.

  ### Changelog notice

  None, only internal cleanup.

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
  * [x] I ran `cargo fmt` and `cargo clippy` before committing

ACKs for top commit:
  ValuedMammal:
    reACK a2f7a8be

Tree-SHA512: 64e5895ff3dc11f71c48b6c436d5c812504d0a24e92f1fdf451936f372d95ccdd8d89e5ac634a041bdee0a4836182f05127864ed744d560c9f8ec560e092c559


Trivial merge