-
Notifications
You must be signed in to change notification settings - Fork 102
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
client/rpcserver: Add cancel route. #411
Conversation
062902b
to
18d7a9d
Compare
@@ -42,7 +45,7 @@ type getFeeResponse struct { | |||
|
|||
// tradeResponse is used when responding to the trade route. | |||
type tradeResponse struct { | |||
OrderID string `json:"orderid"` | |||
OrderID string `json:"orderID"` |
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 don't know what passes for idiomatic json, but I though we were using all lower. Leaving that up to @buck54321
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've been inconsistent again. This is fine.
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.
@buck54321 I don't have an opinion, but I would like them to be the same for the same values. An all lower-case rule would make that simpler however. Let me know
return nil, fmt.Errorf("%w: invalid order id hex", errArgs) | ||
} | ||
if _, err := hex.DecodeString(id); err != nil { | ||
return nil, fmt.Errorf("%w: invalid order id hex", errArgs) |
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.
Wow, %w
is great: https://blog.golang.org/go1.13-errors#TOC_3.3. I didn't know about this addition to the language.
As expected:
|
No description provided.