From da89efa118d2549b04341e123b50de1bb6a53a12 Mon Sep 17 00:00:00 2001 From: Martin-Molinero Date: Tue, 5 Mar 2024 12:36:54 -0300 Subject: [PATCH] Fix Composer map file provider fetching (#9) --- QuantConnect.RBI.Tests/RBIBrokerageTests.cs | 3 +-- QuantConnect.RBI/RBIBrokerage.cs | 2 +- QuantConnect.RBI/RBIBrokerageFactory.cs | 2 -- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/QuantConnect.RBI.Tests/RBIBrokerageTests.cs b/QuantConnect.RBI.Tests/RBIBrokerageTests.cs index 62ef2b2..2d69f68 100644 --- a/QuantConnect.RBI.Tests/RBIBrokerageTests.cs +++ b/QuantConnect.RBI.Tests/RBIBrokerageTests.cs @@ -164,8 +164,7 @@ public void CancelOrder(string ticker, decimal quantity, decimal price) private RBIBrokerage CreateBrokerage() { - return new RBIBrokerage(_fixConfiguration, _orderProvider, _algorithm, _job, TestGlobals.MapFileProvider, - new SecurityProvider(), false); + return new RBIBrokerage(_fixConfiguration, _orderProvider, _algorithm, _job, new SecurityProvider(), false); } } } \ No newline at end of file diff --git a/QuantConnect.RBI/RBIBrokerage.cs b/QuantConnect.RBI/RBIBrokerage.cs index e8806b1..7be719a 100644 --- a/QuantConnect.RBI/RBIBrokerage.cs +++ b/QuantConnect.RBI/RBIBrokerage.cs @@ -54,7 +54,6 @@ public RBIBrokerage( IOrderProvider orderProvider, IAlgorithm algorithm, LiveNodePacket job, - IMapFileProvider mapFileProvider, ISecurityProvider securityProvider, bool logFixMessages) : base("RBI") { @@ -62,6 +61,7 @@ public RBIBrokerage( _job = job; _orderProvider = orderProvider; + var mapFileProvider = Composer.Instance.GetPart(); var symbolMapper = new RBISymbolMapper(mapFileProvider); _fixBrokerageController = new FixBrokerageController(); diff --git a/QuantConnect.RBI/RBIBrokerageFactory.cs b/QuantConnect.RBI/RBIBrokerageFactory.cs index 827f193..0eefa75 100644 --- a/QuantConnect.RBI/RBIBrokerageFactory.cs +++ b/QuantConnect.RBI/RBIBrokerageFactory.cs @@ -103,8 +103,6 @@ public override IBrokerage CreateBrokerage(LiveNodePacket job, IAlgorithm algori algorithm.Transactions, algorithm, job, - Composer.Instance.GetExportedValueByTypeName(Config.Get("map-file-provider", - "QuantConnect.Data.Auxiliary.LocalDiskMapFileProvider")), algorithm.Portfolio, logFixMessages );