Skip to content
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

refactor: interfaces, make 'createTransaction' less error-prone #807

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Commits on May 21, 2024

  1. wallet: introduce "tx amount exceeds balance when fees are included" …

    …error
    
    This was previously implemented at the GUI level but has been broken since #20640
    furszy committed May 21, 2024
    Configuration menu
    Copy the full SHA
    900e5ed View commit details
    Browse the repository at this point in the history

Commits on May 22, 2024

  1. gui: remove unreachable AmountWithFeeExceedsBalance error

    Since #20640, the 'createTransaction' does no longer retrieve the
    fee if the process fails due to insufficient funds.
    
    But, since #25269, 'createTransaction' retrieves an error message
    indicating that the total transaction amount exceeds the wallet
    available balance when fees are included.
    
    So this enum is no longer needed.
    furszy committed May 22, 2024
    Configuration menu
    Copy the full SHA
    a4007a4 View commit details
    Browse the repository at this point in the history
  2. refactor: move CreatedTransactionResult to types.h

    So it can be used by external modules without requiring
    wallet.h dependency.
    furszy committed May 22, 2024
    Configuration menu
    Copy the full SHA
    9cd8462 View commit details
    Browse the repository at this point in the history
  3. refactor: interfaces, make 'createTransaction' less error-prone

    Bundle all function's outputs inside the util::Result returned object.
    
    Reasons for the refactoring:
    - The 'change_pos' ref argument has been a source of bugs in the past.
    - The 'fee' ref argument is currently only set when the transaction creation process succeeds.
    furszy committed May 22, 2024
    Configuration menu
    Copy the full SHA
    0b92ee2 View commit details
    Browse the repository at this point in the history