From 86af23887e2209f04330a69dd692079b9482aea4 Mon Sep 17 00:00:00 2001 From: Martin Molinero Date: Tue, 5 Mar 2024 12:19:25 -0300 Subject: [PATCH] Fix Composer map file provider fetching --- QuantConnect.Wolverine.Tests/WolverineBrokerageTests.cs | 2 +- QuantConnect.Wolverine/WolverineBrokerage.cs | 3 +-- QuantConnect.Wolverine/WolverineBrokerageFactory.cs | 2 -- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/QuantConnect.Wolverine.Tests/WolverineBrokerageTests.cs b/QuantConnect.Wolverine.Tests/WolverineBrokerageTests.cs index b4860b6..db8f700 100644 --- a/QuantConnect.Wolverine.Tests/WolverineBrokerageTests.cs +++ b/QuantConnect.Wolverine.Tests/WolverineBrokerageTests.cs @@ -214,7 +214,7 @@ public void CanLogonAfterLogout() private WolverineBrokerage CreateBrokerage() { - return new WolverineBrokerage(_algorithm, _job, _orderProvider, _fixConfiguration, new SecurityProvider(), TestGlobals.MapFileProvider, true); + return new WolverineBrokerage(_algorithm, _job, _orderProvider, _fixConfiguration, new SecurityProvider(), true); } } } diff --git a/QuantConnect.Wolverine/WolverineBrokerage.cs b/QuantConnect.Wolverine/WolverineBrokerage.cs index 6f79b8b..7740974 100644 --- a/QuantConnect.Wolverine/WolverineBrokerage.cs +++ b/QuantConnect.Wolverine/WolverineBrokerage.cs @@ -63,14 +63,13 @@ public WolverineBrokerage( IOrderProvider orderProvider, FixConfiguration fixConfiguration, ISecurityProvider securityProvider, - IMapFileProvider mapFileProvider, bool logFixMessages) : base("Wolverine") { _job = job; _algorithm = algorithm; _securityProvider = securityProvider; _orderProvider = orderProvider; - + var mapFileProvider = Composer.Instance.GetPart(); _symbolMapper = new WolverineSymbolMapper(mapFileProvider); _fixBrokerageController = new FixBrokerageController(); diff --git a/QuantConnect.Wolverine/WolverineBrokerageFactory.cs b/QuantConnect.Wolverine/WolverineBrokerageFactory.cs index 2bf3157..7bd2431 100644 --- a/QuantConnect.Wolverine/WolverineBrokerageFactory.cs +++ b/QuantConnect.Wolverine/WolverineBrokerageFactory.cs @@ -13,7 +13,6 @@ * limitations under the License. */ -using QuantConnect.Util; using QuantConnect.Packets; using QuantConnect.Interfaces; using QuantConnect.Securities; @@ -101,7 +100,6 @@ public override IBrokerage CreateBrokerage(LiveNodePacket job, IAlgorithm algori algorithm.Transactions, fixConfiguration, algorithm.Portfolio, - Composer.Instance.GetExportedValueByTypeName(Config.Get("map-file-provider", "QuantConnect.Data.Auxiliary.LocalDiskMapFileProvider")), logFixMessages); return instance;