zingolib icon indicating copy to clipboard operation
zingolib copied to clipboard

Fee calc from foundational truths

Open Oscar-Pepper opened this issue 9 months ago • 0 comments

This PR revolves around a new fee calculator calculate_transaction_fee in zingolib/src/wallet/transaction_records_by_id.rs.

  • new fee calculator
  • new error module for wallet where new error type FeeError was added
  • deprecated previous fee calculator and replaced calls throghout codebase
  • needed to make transaction_records_by_id pub for testing so added TODO: doc comments to fix warnings
  • corrected mistake where CommandError didnt implement std::error:Error (unrelated but only 1 line so added onto this PR!)

a following PR will aim to helperise and maybe unify orchard and sapling domains, also cleaning up or aligning similar or related functions in the codebase

Oscar-Pepper avatar May 21 '24 13:05 Oscar-Pepper