Commit 4a3675f
committed
Merge #1768: refactor(wallet): cleanup and remove unused code in create_tx
a2f7a8b 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: #1763 (comment)
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 a2f7a8b
Tree-SHA512: 64e5895ff3dc11f71c48b6c436d5c812504d0a24e92f1fdf451936f372d95ccdd8d89e5ac634a041bdee0a4836182f05127864ed744d560c9f8ec560e092c5591 file changed
+13
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1399 | 1399 | | |
1400 | 1400 | | |
1401 | 1401 | | |
1402 | | - | |
1403 | | - | |
1404 | 1402 | | |
1405 | 1403 | | |
1406 | 1404 | | |
1407 | 1405 | | |
1408 | 1406 | | |
1409 | 1407 | | |
1410 | 1408 | | |
1411 | | - | |
1412 | | - | |
1413 | | - | |
1414 | | - | |
1415 | 1409 | | |
1416 | 1410 | | |
1417 | 1411 | | |
| |||
1467 | 1461 | | |
1468 | 1462 | | |
1469 | 1463 | | |
1470 | | - | |
1471 | | - | |
1472 | 1464 | | |
| 1465 | + | |
1473 | 1466 | | |
1474 | 1467 | | |
1475 | 1468 | | |
| |||
1508 | 1501 | | |
1509 | 1502 | | |
1510 | 1503 | | |
1511 | | - | |
1512 | | - | |
1513 | | - | |
1514 | | - | |
1515 | | - | |
1516 | | - | |
1517 | | - | |
1518 | | - | |
1519 | | - | |
1520 | | - | |
1521 | | - | |
1522 | | - | |
1523 | | - | |
1524 | | - | |
1525 | | - | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
1526 | 1511 | | |
1527 | | - | |
1528 | | - | |
1529 | | - | |
1530 | | - | |
1531 | | - | |
1532 | | - | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
1533 | 1517 | | |
1534 | 1518 | | |
1535 | 1519 | | |
| |||
0 commit comments