diff --git a/SVSim.Database/Services/Inventory/InventoryService.cs b/SVSim.Database/Services/Inventory/InventoryService.cs index cc5ea67..ad33bf2 100644 --- a/SVSim.Database/Services/Inventory/InventoryService.cs +++ b/SVSim.Database/Services/Inventory/InventoryService.cs @@ -57,7 +57,7 @@ public sealed class InventoryService : IInventoryService var freeplay = _config.Get(); var dbTx = await _db.Database.BeginTransactionAsync(ct); - return new InventoryTransaction(_db, dbTx, viewer, freeplay, _log); + return new InventoryTransaction(_db, dbTx, viewer, freeplay, loadCfg.Source, _log); } public long EffectiveBalance(Viewer viewer, SpendCurrency currency) diff --git a/SVSim.Database/Services/Inventory/InventoryTransaction.cs b/SVSim.Database/Services/Inventory/InventoryTransaction.cs index 9d0d273..53e5c3e 100644 --- a/SVSim.Database/Services/Inventory/InventoryTransaction.cs +++ b/SVSim.Database/Services/Inventory/InventoryTransaction.cs @@ -13,6 +13,7 @@ internal sealed class InventoryTransaction : IInventoryTransaction private readonly IDbContextTransaction _dbTx; private readonly ILogger _log; private readonly FreeplayConfig _freeplay; + private readonly GrantSource _source; private bool _committed; public Viewer Viewer { get; } @@ -29,12 +30,14 @@ internal sealed class InventoryTransaction : IInventoryTransaction IDbContextTransaction dbTx, Viewer viewer, FreeplayConfig freeplay, + GrantSource source, ILogger log) { _db = db; _dbTx = dbTx; Viewer = viewer; _freeplay = freeplay; + _source = source; _log = log; }