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

A set of amount preference fixes #129

Open
callebtc opened this issue May 2, 2024 · 1 comment
Open

A set of amount preference fixes #129

callebtc opened this issue May 2, 2024 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@callebtc
Copy link
Contributor

callebtc commented May 2, 2024

Some issues I think are worth fixing:

  • Allow setting the preference for all outputs of a swap (createSplitPayload), not only for proofsToSend (but also proofsToKeep)
  • splitAmount seems to "fill up the rest" with 2^n even if amountPreference is set. Is this intended?
  • Do not check if all amounts are 2^n, since this is not generally the case. Replace this check by checking if every amount has a key.
  • Consider replacing the AmountPrefernce object { amount: int, count: int } with a simple number[] that holds the requested amounts (feels cleaner to me).
@callebtc callebtc changed the title Amount preference fixes A set of amount preference fixes May 2, 2024
@gandlafbtc gandlafbtc added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Jun 6, 2024
@lollerfirst
Copy link

My new PR addresses first 3 points. I take it that point 4 is to be discussed.

This was referenced Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants