HuobiRDCenter / huobi_Golang

Go SDK for Huobi Spot API
https://www.htx.com/zh-cn/opend/newApiPages/
Apache License 2.0
176 stars 86 forks source link

Auth errors are silenced #16

Closed filinvadim closed 3 years ago

filinvadim commented 4 years ago

I don't receive any messages if auth wasn't successful.

Problem is here: https://github.com/HuobiRDCenter/huobi_Golang/blob/75de5c6fcc0ed1917ef0d9e3a00c7b315f427224/pkg/model/auth/websocketv1authenticationresponse.go#L14

Have:

func (p *WebSocketV1AuthenticationResponse) IsAuth() bool {
    return p.Op == "auth" && p.ErrorCode == 0
}

Need:

func (p *WebSocketV1AuthenticationResponse) IsAuth() bool {
    return p.Op == "auth"
}
eynzhang commented 3 years ago

@filinvadim thanks for your feedback, we have fixed this in latest master branch.