currency/manager: remove deadlock potential in concurrent operations (#1545)

* currency/manager: remove deadlock potential in concurrent operations

* fix kucoin test, lets see what this does shalllllll weeeeee.

* another fix in the deep dark depths

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
This commit is contained in:
Ryan O'Hara-Reid
2024-05-17 15:16:02 +10:00
committed by GitHub
parent 7d1eecfa7e
commit ca9efe7275
2 changed files with 9 additions and 3 deletions

View File

@@ -700,7 +700,13 @@ func TestGetFeatures(t *testing.T) {
func TestGetPairFormat(t *testing.T) {
t.Parallel()
_, err := new(Base).GetPairFormat(asset.Spot, true)
b := new(Base)
_, err := b.GetPairFormat(asset.Spot, true)
require.ErrorIs(t, err, currency.ErrPairManagerNotInitialised)
b.CurrencyPairs = currency.PairsManager{
Pairs: make(currency.FullStore),
}
_, err = b.GetPairFormat(asset.Spot, true)
require.ErrorIs(t, err, asset.ErrNotSupported, "Must delegate to GetFormat and error")
}