COINUT: Fix SendHTTPRequest authenticated requests (#308)

This commit is contained in:
Adrian Gallagher
2019-05-22 17:03:35 +10:00
committed by GitHub
parent 506d6011c2
commit 53964aadf5

View File

@@ -366,7 +366,7 @@ func (c *COINUT) SendHTTPRequest(apiRequest string, params map[string]interface{
headers := make(map[string]string)
if authenticated {
headers["X-USER"] = c.ClientID
hmac := common.GetHMAC(common.HashSHA256, payload, []byte(c.APISecret))
hmac := common.GetHMAC(common.HashSHA256, payload, []byte(c.APIKey))
headers["X-SIGNATURE"] = common.HexEncodeToString(hmac)
}
headers["Content-Type"] = "application/json"