Split up common.go, file path fixes and much more

This commit is contained in:
Adrian Gallagher
2019-06-04 17:04:18 +10:00
parent 8c62316e82
commit e965e54e09
74 changed files with 524 additions and 617 deletions

View File

@@ -6,6 +6,7 @@ import (
"fmt"
"net/http"
"strconv"
"strings"
"github.com/gorilla/websocket"
"github.com/thrasher-/gocryptotrader/common"
@@ -534,7 +535,7 @@ func (a *Alphapoint) SendAuthenticatedHTTPRequest(method, path string, data map[
hmac := crypto.GetHMAC(crypto.HashSHA256,
[]byte(n.String()+a.API.Credentials.ClientID+a.API.Credentials.Key),
[]byte(a.API.Credentials.Secret))
data["apiSig"] = common.StringToUpper(crypto.HexEncodeToString(hmac))
data["apiSig"] = strings.ToUpper(crypto.HexEncodeToString(hmac))
path = fmt.Sprintf("%s/ajax/v%s/%s", a.API.Endpoints.URL, alphapointAPIVersion, path)
PayloadJSON, err := common.JSONEncode(data)