From: Steve Myers Date: Tue, 4 Jun 2024 21:07:12 +0000 (-0500) Subject: Merge bitcoindevkit/bdk#1426: feat: add further `bitcoin::Amount` usage on public... X-Git-Tag: v1.0.0-alpha.13~11 X-Git-Url: http://internal-gitweb-vhost/script/%22https:/database/scripts/struct.EncoderStringWriter.html?a=commitdiff_plain;h=26586fa7fe9465a2e2f42133d183f5a9e31d42b7;p=bdk Merge bitcoindevkit/bdk#1426: feat: add further `bitcoin::Amount` usage on public APIs a03949adb0c38ba4c2f44b497871070c1a2170d2 feat: use `Amount` on `calculate_fee`, `fee_absolute`, `fee_amount` and others (Leonardo Lima) Pull request description: builds on top of #1411, further improves #823 ### Description It further updates and adds the usage of `bitcoin::Amount` instead of `u64`. ### Notes to the reviewers Open for comments and discussions. ### Changelog notice - Updated `CreateTxError::FeeTooLow` to use `bitcoin::Amount`. - Updated `Wallet::calculate_fee()`. to use `bitcoin::Amount` - Updated `TxBuilder::fee_absolute()`. to use `bitcoin::Amount`. - Updated `CalculateFeeError::NegativeFee` to use `bitcoin::SignedAmount`. - Updated `TxGraph::calculate_fee()`. to use `bitcoin::Amount`. - Updated `PsbUtils::fee_amount()` to use `bitcoin::Amount`. ### 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 #### New Features: * [x] I've added tests for the new feature * [x] I've added docs for the new feature ACKs for top commit: storopoli: ACK a03949adb0c38ba4c2f44b497871070c1a2170d2 Tree-SHA512: abfbf7d48ec004eb448ed0a928e7e64b5f82a2ab51ec278fede4ddbff4eaba16469a7403f78dfeba1aba693b0132a528bc7c4ef072983cbbcc2592993230e40f --- 26586fa7fe9465a2e2f42133d183f5a9e31d42b7