diff options
Diffstat (limited to 'api/market_config.go')
-rw-r--r-- | api/market_config.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/api/market_config.go b/api/market_config.go index c7e2e15..155da1a 100644 --- a/api/market_config.go +++ b/api/market_config.go | |||
@@ -80,7 +80,7 @@ func (q TestMarketCredentialsQuery) Run() (interface{}, *Error) { | |||
80 | } | 80 | } |
81 | 81 | ||
82 | resultErr := CallExternalService(fmt.Sprintf("'%s' TestCredentials", q.In.Market), EXTERNAL_SERVICE_TIMEOUT_SECONDS*time.Second, func() error { | 82 | resultErr := CallExternalService(fmt.Sprintf("'%s' TestCredentials", q.In.Market), EXTERNAL_SERVICE_TIMEOUT_SECONDS*time.Second, func() error { |
83 | err := Poloniex.TestCredentials(config.Config["key"], config.Config["secret"]) | 83 | err := Poloniex.TestCredentials(config.Config["key"], config.Config["secret"], EXTERNAL_SERVICE_TIMEOUT_SECONDS) |
84 | 84 | ||
85 | if utils.ErrIs(err, markets.InvalidCredentials) { | 85 | if utils.ErrIs(err, markets.InvalidCredentials) { |
86 | return &Error{InvalidMarketCredentials, "wrong market credentials", fmt.Errorf("wrong '%v' market credentials", q.In.Market)} | 86 | return &Error{InvalidMarketCredentials, "wrong market credentials", fmt.Errorf("wrong '%v' market credentials", q.In.Market)} |
@@ -152,7 +152,7 @@ func (q UpdateMarketConfigQuery) Run() (interface{}, *Error) { | |||
152 | } | 152 | } |
153 | 153 | ||
154 | resultErr := CallExternalService(fmt.Sprintf("'%s' TestCredentials", q.In.Market), EXTERNAL_SERVICE_TIMEOUT_SECONDS*time.Second, func() error { | 154 | resultErr := CallExternalService(fmt.Sprintf("'%s' TestCredentials", q.In.Market), EXTERNAL_SERVICE_TIMEOUT_SECONDS*time.Second, func() error { |
155 | err := Poloniex.TestCredentials(marketConfig.Config["key"], marketConfig.Config["secret"]) | 155 | err := Poloniex.TestCredentials(marketConfig.Config["key"], marketConfig.Config["secret"], EXTERNAL_SERVICE_TIMEOUT_SECONDS) |
156 | 156 | ||
157 | if utils.ErrIs(err, markets.InvalidCredentials) { | 157 | if utils.ErrIs(err, markets.InvalidCredentials) { |
158 | return &Error{InvalidMarketCredentials, "wrong market credentials", fmt.Errorf("wrong '%v' market credentials", q.In.Market)} | 158 | return &Error{InvalidMarketCredentials, "wrong market credentials", fmt.Errorf("wrong '%v' market credentials", q.In.Market)} |