mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-24 23:16:52 +00:00
Prevent authenticated calls when authenticated API support is disabled
This commit is contained in:
@@ -589,8 +589,8 @@ func (b *Bitfinex) Withdrawal(withdrawType, wallet, address string, amount float
|
||||
}
|
||||
|
||||
func (b *Bitfinex) SendAuthenticatedHTTPRequest(method, path string, params map[string]interface{}, result interface{}) error {
|
||||
if len(b.APIKey) == 0 {
|
||||
return errors.New("SendAuthenticatedHTTPRequest: Invalid API key")
|
||||
if !b.AuthenticatedAPISupport {
|
||||
return fmt.Errorf(exchange.WarningAuthenticatedRequestWithoutCredentialsSet, b.Name)
|
||||
}
|
||||
|
||||
request := make(map[string]interface{})
|
||||
|
||||
Reference in New Issue
Block a user