mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-05 15:10:59 +00:00
bitfinex: fix potential panic caused by wrapper issues cmd (#1118)
* bitfinex: fix potential panic caused by wrapper issues cmd * bitfinex: add tests and disallow empty base, empty quote is fine. * rm quote check Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
This commit is contained in:
@@ -1139,10 +1139,7 @@ func disruptFormatting(p currency.Pair) (currency.Pair, error) {
|
||||
if p.Base.IsEmpty() {
|
||||
return currency.EMPTYPAIR, errors.New("cannot disrupt formatting as base is not populated")
|
||||
}
|
||||
if p.Quote.IsEmpty() {
|
||||
return currency.EMPTYPAIR, errors.New("cannot disrupt formatting as quote is not populated")
|
||||
}
|
||||
|
||||
// NOTE: Quote can be empty for margin funding
|
||||
return currency.Pair{
|
||||
Base: p.Base.Upper(),
|
||||
Quote: p.Quote.Lower(),
|
||||
|
||||
@@ -39,6 +39,11 @@
|
||||
"secret": "Secret",
|
||||
"otpSecret": "-"
|
||||
},
|
||||
"binanceus": {
|
||||
"key": "Key",
|
||||
"secret": "Secret",
|
||||
"otpSecret": "-"
|
||||
},
|
||||
"bitfinex": {
|
||||
"key": "Key",
|
||||
"secret": "Secret",
|
||||
@@ -80,6 +85,11 @@
|
||||
"secret": "Secret",
|
||||
"otpSecret": "-"
|
||||
},
|
||||
"bybit": {
|
||||
"key": "Key",
|
||||
"secret": "Secret",
|
||||
"otpSecret": "-"
|
||||
},
|
||||
"coinbasepro": {
|
||||
"key": "Key",
|
||||
"secret": "Secret",
|
||||
@@ -148,10 +158,10 @@
|
||||
"otpSecret": "-"
|
||||
},
|
||||
"okx": {
|
||||
"key": "Key",
|
||||
"secret": "Secret",
|
||||
"clientID": "ClientID",
|
||||
"otpSecret": "-"
|
||||
"key": "Key",
|
||||
"secret": "Secret",
|
||||
"clientID": "ClientID",
|
||||
"otpSecret": "-"
|
||||
},
|
||||
"poloniex": {
|
||||
"key": "Key",
|
||||
|
||||
Reference in New Issue
Block a user