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

client: fix split option handling #1988

Merged
merged 3 commits into from
Dec 29, 2022
Merged

Commits on Dec 19, 2022

  1. client/asset: fix estimateSwap split rejection

    The enough func in estimateSwap does not account for a split transaction
    at the start, so it is possible that funding for trySplit would actually
    choose more UTXOs. Actual order funding accounts for this. For this
    estimate, we will just not use a split tx if the split-adjusted required
    funds exceeds the total value of the UTXOs selected with this enough
    closure.
    
    The fix is to reject a split transaction if the output amount plus
    split tx fees is more than the sum of the amounts of the utxos selected
    by fund, rather than the total of the available utxos provided to fund
    initially. There is no point to calling fund again with a different
    enough func that accounts for the cost split tx because this indicates
    it would reqiure an additional UTXO, thus making the spit txn wasteful.
    chappjc committed Dec 19, 2022
    Configuration menu
    Copy the full SHA
    65dba33 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a07e92e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5d1d5cf View commit details
    Browse the repository at this point in the history