-
Notifications
You must be signed in to change notification settings - Fork 321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove TransactionDetails from Wallet API #1048
Remove TransactionDetails from Wallet API #1048
Conversation
c26c9c6
to
51fe7f9
Compare
51fe7f9
to
d147f66
Compare
ebb9f82
to
40d5af3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just have a nit
ACK 40d5af3
16452c5
to
1667496
Compare
@LLFourn continuing #1015 (comment) here. Are you ok with the name I'm now calling the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK. See minor comments.
bf88b7e
to
1992c62
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 1992c62
left some nits
346521c
to
f1d868d
Compare
f1d868d
to
b3cbfb9
Compare
Added - Wallet::sent_and_received function - Wallet::calculate_fee and Wallet::calculate_fee_rate functions - Wallet::error::CalculateFeeError BREAKING CHANGES: Removed - TransactionDetails struct Changed - Wallet::get_tx now returns CanonicalTx instead of TransactionDetails - TxBuilder::finish now returns only a PartiallySignedTransaction
…alculateFeeError> added - tx_graph::CalculateFeeError enum BREAKING CHANGES: changed - TxGraph::calculate_fee function to return Result<u64,CalculateFeeError> instead of Option<i64>
…fee functions added - Wallet::insert_txout function to allow inserting foreign TxOuts - test to verify error when trying to calculate fee with missing foreign utxo - test to calculate fee with inserted foreign utxo updated - docs for Wallet::calculate_fee, Wallet::calculate_fee_rate, and TxGraph::calculate_fee with note about missing foreign utxos
b3cbfb9
to
2f9318d
Compare
I've rebased, fixed docs and fixed a new MSRV issue. Just need @evanlinjin to ACK and then I'll merge, which will also fix |
…f psbt.fee_amount() - removed test_calculate_fee_with_inserted_foreign_utxo() since it now duplicates test in test_add_foreign_utxo()
2f9318d
to
5fb5061
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 5fb5061
Description
Removed
TransactionDetails
and changedWallet::get_tx
to return aCanonicalTx
, andTxBuilder::finish
to return only aPartiallySignedTransaction
. This should fix #922 and fix #1015.I also added
Wallet
functions to get aTransaction
send and receive amounts, fee, andFeeRate
.see: #922 (comment)
Notes to the reviewers
Alot of wallet tests had to change since
TxBuilder::finish
only returns a PSBT now.I added a new
CalculateFeeError
which follows changes coming in #1028.Changelog notice
Added
BREAKING CHANGES:
Removed
Changed
Checklists
All Submissions:
cargo fmt
andcargo clippy
before committingNew Features: