forked from thrasher-corp/gocryptotrader
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Exchanges: Include format pair in wrapper functions and test for form…
…atting issues via tool wrapper issues (thrasher-corp#582) * Adds formatting of pair within binance wrapper, adds return of error from cli.ShowCommmandHelp * Add formatting function to submit order wrapper functions * Remove superfluous functionality * Updated exchange wrapper issues to create a disruptive pair to see which exchanges require attention, updates currency code generation and matching * reinstated format check, fixed tests * fixed niterinos * fix test * fix spelling mistake * make html file more aesthetic * Add missing format pairs * add formatting to pair for BTC Markets func * fix spelling
- Loading branch information
Showing
32 changed files
with
428 additions
and
198 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
cmd/exchange_wrapper_issues/exchange_wrapper_issues_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package main | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/thrasher-corp/gocryptotrader/currency" | ||
) | ||
|
||
func TestDisruptFormatting(t *testing.T) { | ||
_, err := disruptFormatting(currency.Pair{}) | ||
if err == nil { | ||
t.Fatal("error cannot be nil") | ||
} | ||
|
||
_, err = disruptFormatting(currency.Pair{Base: currency.BTC}) | ||
if err == nil { | ||
t.Fatal("error cannot be nil") | ||
} | ||
|
||
p := currency.NewPair(currency.BTC, currency.USDT) | ||
|
||
badPair, err := disruptFormatting(p) | ||
if err != nil { | ||
t.Fatal(err) | ||
} | ||
|
||
if badPair.String() != "BTC-TEST-DELIM-usdt" { | ||
t.Fatal("incorrect disrupted pair") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.