-
Notifications
You must be signed in to change notification settings - Fork 13
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
chore: preconfigured orderbook #198
Conversation
bb180ba
to
18ed5c5
Compare
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 would not overcomplicate the interface with too many options (config or class instance feels overkill).
Also. If possible, we should work with interfaces and not actual class implementation.
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.
Great there's no TS casting!
Nice also we pass the orderbook API. I think is better than depend on the config.
On my last review, i was hinting that ideally we would depend on simpler interfaces instead of a full instance of a class.
This is a nit, but as you asked for feedback on this regard, I recommend to not depending on the poll method on the full Orderbook API (and less on an instance of an implementation).
You could depend on a simple interface: i.e. getOrder
Or even better, you can close even further the interface by passing a existsOrder(string: orderId): boolean
@@ -1,6 +1,6 @@ | |||
{ | |||
"name": "@cowprotocol/cow-sdk", | |||
"version": "4.1.0", | |||
"version": "5.0.0", |
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.
will this affect to anything in learn.cow.fi?
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.
There is no use of polling yet in any tutorials there.
Signed-off-by: mfw78 <[email protected]>
cb82917
to
19788dc
Compare
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.
Soft approve
This PR:
PollParams
type to take an already-instantiatedOrderBookApi
.NOTES: As this is a change to the type, this is a breaking change and is accompanied by a major version bump.