mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-07 07:26:48 +00:00
exchanges: Change wrapper function FetchTradablePairs to return currency.Pairs (#1093)
* exchanges: FetchTradablePairs currency pair slice return (1) * exchanges: finish conversion * thrasher: nits + linter * exchanges: shift var dec into for loop * exchanges: Apply changes thanks @thrasher- * Update exchanges/alphapoint/alphapoint_wrapper.go Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io> * thrasher: nitters * Update exchanges/bitflyer/bitflyer_wrapper.go Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io> * thrasher: fix more nitters Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io> Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
This commit is contained in:
@@ -217,7 +217,7 @@ func ({{.Variable}} *{{.CapitalName}}) Run() {
|
||||
}
|
||||
|
||||
// FetchTradablePairs returns a list of the exchanges tradable pairs
|
||||
func ({{.Variable}} *{{.CapitalName}}) FetchTradablePairs(ctx context.Context, asset asset.Item) ([]string, error) {
|
||||
func ({{.Variable}} *{{.CapitalName}}) FetchTradablePairs(ctx context.Context, a asset.Item) (currency.Pairs, error) {
|
||||
// Implement fetching the exchange available pairs if supported
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
@@ -398,7 +398,7 @@ func testWrappers(e exchange.IBotExchange, base *exchange.Base, config *Config)
|
||||
Response: jsonifyInterface([]interface{}{updateOrderbookResponse}),
|
||||
})
|
||||
|
||||
var fetchTradablePairsResponse []string
|
||||
var fetchTradablePairsResponse []currency.Pair
|
||||
fetchTradablePairsResponse, err = e.FetchTradablePairs(context.TODO(), assetTypes[i])
|
||||
msg = ""
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user