feat(battle-pass): tag claim tx as BattlePassClaim for acquire history
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -164,7 +164,7 @@ public sealed class BattlePassService : IBattlePassService
|
||||
return new BattlePassBuyOutcome(23, Array.Empty<GrantedReward>(), Array.Empty<GrantedReward>());
|
||||
|
||||
// Open inventory tx — loads viewer + opens DB tx.
|
||||
await using var tx = await _inv.BeginAsync(viewerId, ct);
|
||||
await using var tx = await _inv.BeginAsync(viewerId, ct, cfg => cfg.Source = GrantSource.BattlePassClaim);
|
||||
|
||||
var spendResult = await tx.TrySpendAsync(SpendCurrency.Crystal, season.PriceCrystal, ct);
|
||||
if (!spendResult.Success)
|
||||
@@ -231,7 +231,7 @@ public sealed class BattlePassService : IBattlePassService
|
||||
var claims = await _viewerBp.GetClaimsAsync(viewerId, season.Id, ct);
|
||||
var claimSet = claims.Select(c => (c.Track, c.Level)).ToHashSet();
|
||||
|
||||
await using var tx = await _inv.BeginAsync(viewerId, ct);
|
||||
await using var tx = await _inv.BeginAsync(viewerId, ct, cfg => cfg.Source = GrantSource.BattlePassClaim);
|
||||
|
||||
for (int level = beforeLevel + 1; level <= afterLevel; level++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user