Skip to content

Commit

Permalink
fixup! Config: Move assetEnabled upgrade to Version management
Browse files Browse the repository at this point in the history
  • Loading branch information
gbjk committed Nov 27, 2024
1 parent 0d605aa commit 8ebcd96
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions backtester/engine/live_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -429,16 +429,12 @@ func TestSetDataForClosingAllPositions(t *testing.T) {
}

dataHandler.started = 1
cp := currency.NewPair(currency.BTC, currency.USDT).Format(
currency.PairFormat{
Uppercase: true,
})
cp := currency.NewPair(currency.BTC, currency.USDT).Format(currency.PairFormat{Uppercase: true})
f := &binanceus.Binanceus{}
f.SetDefaults()
fb := f.GetBase()
fbA := fb.CurrencyPairs.Pairs[asset.Spot]
fbA.Enabled = fbA.Enabled.Add(cp)
fbA.Available = fbA.Available.Add(cp)
err := fb.CurrencyPairs.StorePairs(asset.Spot, currency.Pairs{cp}, true)
require.NoError(t, err, "StorePairs must not error")
dataHandler.sourcesToCheck = []*liveDataSourceDataHandler{
{
exchange: f,
Expand Down Expand Up @@ -473,7 +469,7 @@ func TestSetDataForClosingAllPositions(t *testing.T) {
},
}
dataHandler.dataHolder = &fakeDataHolder{}
_, err := dataHandler.FetchLatestData()
_, err = dataHandler.FetchLatestData()
if !errors.Is(err, nil) {
t.Errorf("received '%v' expected '%v'", err, nil)
}
Expand Down

0 comments on commit 8ebcd96

Please sign in to comment.