mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-24 23:16:52 +00:00
Common.go testing (#190)
* Common.go testing: Improved GetHMAC test Cut ByteArrayToString from common, already have a function that does the same thing more coverage for SendHTTPRequest test Improved SendHTTPGetRequest test added JSONDecode test added UnixMillis test added RecvWindow test added FloatFromString test added IntFromString test added Int64FromString test added TestTimeFromUnixTimestampFloat test
This commit is contained in:
committed by
Adrian Gallagher
parent
f6bce891c4
commit
7c21cb6f84
@@ -394,7 +394,7 @@ func (g *Gateio) SendAuthenticatedHTTPRequest(method, endpoint, param string, re
|
||||
headers["key"] = g.APIKey
|
||||
|
||||
hmac := common.GetHMAC(common.HashSHA512, []byte(param), []byte(g.APISecret))
|
||||
headers["sign"] = common.ByteArrayToString(hmac)
|
||||
headers["sign"] = common.HexEncodeToString(hmac)
|
||||
|
||||
url := fmt.Sprintf("%s/%s/%s", g.APIUrl, gateioAPIVersion, endpoint)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user