Skip to content

Remove TransactionDetails from Wallet API#1048

Merged
evanlinjin merged 6 commits intobitcoindevkit:masterfrom
notmandatory:wallet_txdetails
Aug 31, 2023
Merged

Remove TransactionDetails from Wallet API#1048
evanlinjin merged 6 commits intobitcoindevkit:masterfrom
notmandatory:wallet_txdetails

Conversation

@notmandatory
Copy link
Copy Markdown
Member

@notmandatory notmandatory commented Jul 27, 2023

Description

Removed TransactionDetails and changed Wallet::get_tx to return a CanonicalTx, and TxBuilder::finish to return only a PartiallySignedTransaction. This should fix #922 and fix #1015.

I also added Wallet functions to get a Transaction send and receive amounts, fee, and FeeRate.

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

  • Wallet::sent_and_received function
  • Wallet::calculate_fee and Wallet::calculate_fee_rate functions
  • Wallet::error::CalculateFeeError
  • Wallet::insert_txout function to allow inserting foreign TxOuts

BREAKING CHANGES:

Removed

  • TransactionDetails struct

Changed

  • Wallet::get_tx now returns CanonicalTx instead of TransactionDetails
  • TxBuilder::finish now returns only a PartiallySignedTransaction

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Wallet::sent_and_received doesn't exist Kill TransactionDetails

4 participants