Quick bug fix (#112)

* Added verbosity to returned error in currency.go

* Fixed bug with request handler init in okcoin.
This commit is contained in:
Ryan O'Hara-Reid
2018-03-27 17:31:46 +11:00
committed by Adrian Gallagher
parent 7fc9d20fd7
commit 5f25fd8be7
2 changed files with 8 additions and 7 deletions

View File

@@ -106,7 +106,6 @@ func (o *OKCoin) SetDefaults() {
o.AssetTypes = []string{ticker.Spot}
o.SupportsAutoPairUpdating = false
o.Handler = new(request.Handler)
o.SetRequestHandler(o.Name, okcoinAuthRate, okcoinUnauthRate, new(http.Client))
if okcoinDefaultsSet {
o.AssetTypes = append(o.AssetTypes, o.FuturesValues...)
@@ -114,12 +113,14 @@ func (o *OKCoin) SetDefaults() {
o.Name = "OKCOIN International"
o.WebsocketURL = okcoinWebsocketURL
o.setCurrencyPairFormats()
o.SetRequestHandler(o.Name, okcoinAuthRate, okcoinUnauthRate, new(http.Client))
} else {
o.APIUrl = okcoinAPIURLChina
o.Name = "OKCOIN China"
o.WebsocketURL = okcoinWebsocketURLChina
okcoinDefaultsSet = true
o.setCurrencyPairFormats()
o.SetRequestHandler(o.Name, okcoinAuthRate, okcoinUnauthRate, new(http.Client))
}
}