mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-08 07:26:48 +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:
@@ -743,7 +743,13 @@ func (b *Binance) SendAuthHTTPRequest(ePath exchange.URL, method, path string, p
|
||||
fullPath := endpointPath + path
|
||||
params.Set("timestamp", strconv.FormatInt(time.Now().Unix()*1000, 10))
|
||||
signature := params.Encode()
|
||||
hmacSigned := crypto.GetHMAC(crypto.HashSHA256, []byte(signature), []byte(b.API.Credentials.Secret))
|
||||
var hmacSigned []byte
|
||||
hmacSigned, err = crypto.GetHMAC(crypto.HashSHA256,
|
||||
[]byte(signature),
|
||||
[]byte(b.API.Credentials.Secret))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
hmacSignedStr := crypto.HexEncodeToString(hmacSigned)
|
||||
headers := make(map[string]string)
|
||||
headers["X-MBX-APIKEY"] = b.API.Credentials.Key
|
||||
|
||||
@@ -1331,7 +1331,10 @@ func TestGetFeeByTypeOfflineTradeFee(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
var feeBuilder = setFeeBuilder()
|
||||
b.GetFeeByType(feeBuilder)
|
||||
_, err := b.GetFeeByType(feeBuilder)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if !areTestAPIKeysSet() || mockTests {
|
||||
if feeBuilder.FeeType != exchange.OfflineTradeFee {
|
||||
t.Errorf("Expected %v, received %v", exchange.OfflineTradeFee, feeBuilder.FeeType)
|
||||
|
||||
Reference in New Issue
Block a user