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

feat(swaps): recalculate partial swap amounts #633

Merged
merged 9 commits into from
Nov 16, 2018
Merged

Conversation

ImmanuelSegol
Copy link
Contributor

closes #550

@sangaman
Copy link
Collaborator

@ImmanuelSegol Would you mind resolving the conflicts before I review? I know a decent amount was changed so it would be helpful to see what the changes are actually going to look like.

@ImmanuelSegol ImmanuelSegol requested review from sangaman and a user November 12, 2018 12:40
Copy link
Collaborator

@sangaman sangaman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is missing changes to OrderBook.handleSwapRequest to accept a swap request for a reduced amount if the full amount is not available.

lib/swaps/Swaps.ts Outdated Show resolved Hide resolved
lib/swaps/Swaps.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@sangaman sangaman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still needs the logic to accept the reduced quantity in the first place, but I'm thinking I can just add that in with a separate PR as it wouldn't hurt to merge this part on its own.

lib/swaps/Swaps.ts Outdated Show resolved Hide resolved
@sangaman
Copy link
Collaborator

@ImmanuelSegol Needs a rebase too, but I think let's just make these minor changes and then merge before the next release tomorrow.

@sangaman
Copy link
Collaborator

I'm thinking that we'll also need changes to the matching logic to try to rematch any part of a swap request that wasn't accepted, I'll try to handle that as well in the next PR.

@sangaman sangaman merged commit d1f1eef into master Nov 16, 2018
@ghost ghost removed the in progress label Nov 16, 2018
@sangaman sangaman changed the title Partial swap feat(swaps): recalculate partial swap amounts Nov 16, 2018
@sangaman sangaman deleted the partial-swap branch November 16, 2018 04:40
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.

Partial swap acceptance
2 participants