X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=markets%2Fpoloniex.go;fp=markets%2Fpoloniex.go;h=cadc8295c2464c6dedbab9306671eeea4ae7a031;hb=299b6b6d9fb879c06e675ef240f361348629ff6c;hp=58645b2b2a23750c4adae2633e7c7297bfb71d19;hpb=3b8833854f83f75e3d16c1fdb869937f690e48ea;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FCryptoportfolio%2FFront.git diff --git a/markets/poloniex.go b/markets/poloniex.go index 58645b2..cadc829 100644 --- a/markets/poloniex.go +++ b/markets/poloniex.go @@ -20,7 +20,7 @@ func poloniexInvalidCredentialsError(err error) bool { if err == nil { return false } - return strings.Contains(err.Error(), "Invalid API key/secret pair") + return strings.Contains(err.Error(), "Invalid API key/secret pair") || strings.Contains(err.Error(), "Set the API KEY and API SECRET") } func poloniexRestrictedIPError(err error) bool { @@ -65,7 +65,7 @@ func (p *Poloniex) TestCredentials(apiKey, apiSecret string) error { return utils.Error{IPRestricted, "IP restricted api key"} } - return nil + return err } func (p *Poloniex) GetBalance(apiKey, apiSecret string) (Summary, error) {