]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/Cryptoportfolio/Front.git/blobdiff - api/market_config.go
Set poloniex client timeout to 20 seconds.
[perso/Immae/Projets/Cryptomonnaies/Cryptoportfolio/Front.git] / api / market_config.go
index c7e2e15428b181eb46f48260e852935dea2b0e6b..155da1abc12fcdf1e022c688396c2a716f787fd9 100644 (file)
@@ -80,7 +80,7 @@ func (q TestMarketCredentialsQuery) Run() (interface{}, *Error) {
        }
 
        resultErr := CallExternalService(fmt.Sprintf("'%s' TestCredentials", q.In.Market), EXTERNAL_SERVICE_TIMEOUT_SECONDS*time.Second, func() error {
-               err := Poloniex.TestCredentials(config.Config["key"], config.Config["secret"])
+               err := Poloniex.TestCredentials(config.Config["key"], config.Config["secret"], EXTERNAL_SERVICE_TIMEOUT_SECONDS)
 
                if utils.ErrIs(err, markets.InvalidCredentials) {
                        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) {
        }
 
        resultErr := CallExternalService(fmt.Sprintf("'%s' TestCredentials", q.In.Market), EXTERNAL_SERVICE_TIMEOUT_SECONDS*time.Second, func() error {
-               err := Poloniex.TestCredentials(marketConfig.Config["key"], marketConfig.Config["secret"])
+               err := Poloniex.TestCredentials(marketConfig.Config["key"], marketConfig.Config["secret"], EXTERNAL_SERVICE_TIMEOUT_SECONDS)
 
                if utils.ErrIs(err, markets.InvalidCredentials) {
                        return &Error{InvalidMarketCredentials, "wrong market credentials", fmt.Errorf("wrong '%v' market credentials", q.In.Market)}