-
Notifications
You must be signed in to change notification settings - Fork 215
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
Compare Swap and Trade Helpers and make more consistent #1667
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.
looks good! One outdated comment.
keepHandleInactiveMsg = 'prior offer is unavailable', | ||
leftSeat, | ||
rightSeat, | ||
leftHasExitedMsg = 'the left seat in swap() has exited', |
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.
Given async, let's add several elements to the error about e.g., what brands are being traded?
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.
Hmm, we can't currently display brands. What kind of information would you like to see?
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.
As an aside, all of the information console logged within trade
applies to swap
too because swap uses trade.
bb2129e
to
a4b2dc1
Compare
3efd274
to
7240206
Compare
50cd6bb
to
5fc8c36
Compare
Trade
now checks both seats to see if either have exited.Trade
does notkickOut
any seat, but throws errors instead, which will result in the seat in the offerHandler being kickedOut naturally if not handled.Swap
now kicks out both seats if any error is thrown intrade
. This is because our usage changed such that we often callzcf.shutdown()
after a swap, so there is no good reason to treat the seats asymmetrically.The distinctions between
swap
andtrade
still apply:Closes #1531