You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returns a Bad Request error rather than the expected quote OrderQuoteResponse. It seems as though the Orderbook API and this SDK are using completely different request bodies. At least that's what I notice when checking the live Orderbook swagger docs here: https://beta.docs.cow.fi/cow-protocol/reference/apis/orderbook.
Further to this, there are some type mismatch issues:
getQuote returns a OrderQuoteResponse, but signOrder expects an UnsignedOrder. The docs don't cover this conversion and you need to do an ugly typescript cast to get around it.
sendOrder expects a SigningScheme but signOrder returns an EcdsaSigningScheme, which again leads to an ugly typescript cast that the docs (linked) don't cover.
The text was updated successfully, but these errors were encountered:
Further to this, the OrderQuoteResponse has receiver as an optional value (may be null), however receiver is required for UnsignedOrder. The cow-sdk should adjust the UnsignedOrder such that receiver may also be null, and have signOrder inject the assumptions required.
SDK Version: 4.0.3
I've been following the beta docs, they're very nice but not sure if it's too early for that...
https://beta.docs.cow.fi/cow-protocol/reference/sdks/cow-sdk#sign-fetch-post-and-cancel-order
I noticed a few issue which I'd like to summarize here, if you agree with them maybe some of them can be split into separate issues.
The core issue is that a
getQuote
call with the followingOrderQuoteRequest
:returns a
Bad Request
error rather than the expected quoteOrderQuoteResponse
. It seems as though the Orderbook API and this SDK are using completely different request bodies. At least that's what I notice when checking the live Orderbook swagger docs here: https://beta.docs.cow.fi/cow-protocol/reference/apis/orderbook.Further to this, there are some type mismatch issues:
getQuote
returns aOrderQuoteResponse
, butsignOrder
expects anUnsignedOrder
. The docs don't cover this conversion and you need to do an ugly typescript cast to get around it.sendOrder
expects aSigningScheme
butsignOrder
returns anEcdsaSigningScheme
, which again leads to an ugly typescript cast that the docs (linked) don't cover.The text was updated successfully, but these errors were encountered: