mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-03 23:16:53 +00:00
linter: Enable error checking linter (#766)
* golangci: Enable err checking linter to expose unchecked errors. * gct: handle errors across the board * gct: handle errors NOTE: Found bug in FTX (WIP) * linter: fix issues * ftx/exchanges: fix bug where error was being returned when setting pair management variables to an already enabled state * bitmex: fix bug where a dangly supported asset in config danglied up the place. * linter: fix more linter issues * linter: fix my terrible spelling. * currency: fix test * exchanges: fix tests * logger: fix test * exchanges: fix tests * glorious: nits * vm: revert rm variable and instigate test
This commit is contained in:
@@ -97,11 +97,17 @@ func main() {
|
||||
resp.Body.Close()
|
||||
log.Println("Connected to websocket!")
|
||||
|
||||
hash, err := crypto.GetSHA256([]byte(cfg.RemoteControl.Password))
|
||||
if err != nil {
|
||||
log.Println("Unable to generate SHA256 hash from remote control password:", err)
|
||||
return
|
||||
}
|
||||
|
||||
log.Println("Authenticating..")
|
||||
var wsResp WebsocketEventResponse
|
||||
reqData := WebsocketAuth{
|
||||
Username: cfg.RemoteControl.Username,
|
||||
Password: crypto.HexEncodeToString(crypto.GetSHA256([]byte(cfg.RemoteControl.Password))),
|
||||
Password: crypto.HexEncodeToString(hash),
|
||||
}
|
||||
err = SendWebsocketEvent("auth", reqData, &wsResp)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user