Skip to content

Commit

Permalink
Bitfinex: Add annotation to WS id/cid assest errs
Browse files Browse the repository at this point in the history
  • Loading branch information
gbjk committed Sep 7, 2023
1 parent a03e482 commit fb623bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions exchanges/bitfinex/bitfinex_websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@ func (b *Bitfinex) handleWSNotification(d []interface{}, respRaw []byte) error {
case strings.Contains(channelName, wsOrderNewRequest):
if data[2] != nil {
if cid, ok := data[2].(float64); !ok {
return common.GetTypeAssertError("float64", data[2])
return common.GetTypeAssertError("float64", data[2], channelName+" cid")
} else if cid > 0 {
if b.Websocket.Match.IncomingWithData(int64(cid), respRaw) {
return nil
Expand All @@ -929,7 +929,7 @@ func (b *Bitfinex) handleWSNotification(d []interface{}, respRaw []byte) error {
strings.Contains(channelName, wsOrderCancelRequest):
if data[0] != nil {
if id, ok := data[0].(float64); !ok {
return common.GetTypeAssertError("float64", data[0])
return common.GetTypeAssertError("float64", data[0], channelName+" id")
} else if id > 0 {
if b.Websocket.Match.IncomingWithData(int64(id), respRaw) {
return nil
Expand Down

0 comments on commit fb623bf

Please sign in to comment.