mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-06 23:16:53 +00:00
exchanges: improves GetDefaultConfig method (#1245)
* exchanges: Add function to get standard config * exchanges: add tests (cherry-pick here and above) * after pick stuff * cleanup --------- Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
This commit is contained in:
@@ -30,12 +30,12 @@ import (
|
||||
// GetDefaultConfig returns a default exchange config
|
||||
func (i *ItBit) GetDefaultConfig(ctx context.Context) (*config.Exchange, error) {
|
||||
i.SetDefaults()
|
||||
exchCfg := new(config.Exchange)
|
||||
exchCfg.Name = i.Name
|
||||
exchCfg.HTTPTimeout = exchange.DefaultHTTPTimeout
|
||||
exchCfg.BaseCurrencies = i.BaseCurrencies
|
||||
exchCfg, err := i.GetStandardConfig()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
err := i.SetupDefaults(exchCfg)
|
||||
err = i.SetupDefaults(exchCfg)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user