Skip to content

Commit

Permalink
Merge pull request #12 from jhonabreul/refactor-subscription-validation
Browse files Browse the repository at this point in the history
Use Globals for credentials access for subscription validation
  • Loading branch information
jhonabreul authored Feb 21, 2024
2 parents 48c0cdb + 073fe82 commit 709fd03
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions QuantConnect.Wolverine/WolverineBrokerage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ public class WolverineBrokerage : Brokerage
/// </summary>
/// <param name="aggregator">consolidate ticks</param>
public WolverineBrokerage(
IAlgorithm algorithm,
LiveNodePacket job,
IOrderProvider orderProvider,
IAlgorithm algorithm,
LiveNodePacket job,
IOrderProvider orderProvider,
FixConfiguration fixConfiguration,
ISecurityProvider securityProvider,
IMapFileProvider mapFileProvider,
Expand Down Expand Up @@ -292,10 +292,10 @@ private static void ValidateSubscription()
{
try
{
var productId = 221;
var userId = Config.GetInt("job-user-id");
var token = Config.Get("api-access-token");
var organizationId = Config.Get("job-organization-id", null);
const int productId = 221;
var userId = Globals.UserId;
var token = Globals.UserToken;
var organizationId = Globals.OrganizationID;
// Verify we can authenticate with this user and token
var api = new ApiConnection(userId, token);
if (!api.Connected)
Expand Down

0 comments on commit 709fd03

Please sign in to comment.