-
Notifications
You must be signed in to change notification settings - Fork 43
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(OrderBook.ts) persist trades to DB #659
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests are failing because the orders are not being created in the db - there's an addOrderIfNotExists
method you can use before you persist any trades.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pulled this down and ran a quick sanity test and it worked fine, but I noticed we're not persisting trades on swap.paid
which marks a successful trade of a remote peer filling one of our orders. I'm going to just fix these up and merge to get in the release.
Edit: Never mind actually, I will just remove an unused import for now and then open a separate PR.
Edit: This addresses most of #608 but not the case where a swap is initiated by a remote peer.