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

[FIX] Wallet sort outputs before swapping #648

Merged
merged 7 commits into from
Nov 5, 2024

Conversation

lollerfirst
Copy link
Contributor

@lollerfirst lollerfirst commented Oct 26, 2024

From Issue: #640

Wallet should order inputs to all swaps and remember which outputs to keep or send?

I am sorting the inputs here but I am not sure what do you mean by "remember which outputs to keep or send". Isn't it already doing it?

@callebtc
Copy link
Collaborator

callebtc commented Oct 28, 2024

I was referring to the outputs not the inputs, my bad. The output sorting can tell the mint what portion of the outputs you're going to keep vs send (imagine you create ouputs [[...1000 sat], [...53 sat]], the mint can infer you're probably sending 1000 sat to someone. We can sort the outputs per amount before a swap, then un-sort them again so we know what part to keep vs to send (should be a fairly simple change).

@lollerfirst
Copy link
Contributor Author

Should be good now

@lollerfirst lollerfirst changed the title [FIX] Sort input proofs before swapping [FIX] Wallet sort outputs before swapping Oct 28, 2024
Copy link

codecov bot commented Oct 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.32%. Comparing base (700320a) to head (3988f96).
Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #648      +/-   ##
==========================================
+ Coverage   56.57%   66.32%   +9.74%     
==========================================
  Files          98       81      -17     
  Lines       10568     8371    -2197     
==========================================
- Hits         5979     5552     -427     
+ Misses       4589     2819    -1770     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@callebtc callebtc merged commit ed0d25d into cashubtc:main Nov 5, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants