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:
Ryan O'Hara-Reid
2023-01-24 16:50:59 +11:00
committed by GitHub
parent 1d779c301b
commit 05558aabfb
4 changed files with 33 additions and 8 deletions

View File

@@ -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(),

View File

@@ -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",