feat(inventory): tag remaining BeginAsync call sites for acquire history

Add GrantSource.CardCraft (16) for card crafting via red ether, and tag
CardInventoryRepository.Create accordingly. LoadController backfill and
ArenaTwoPickService.Entry are debit/infrastructure-only — left as Unknown.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
gamer147
2026-06-09 15:09:43 -04:00
parent c2c3abc6f0
commit 5334263793
2 changed files with 4 additions and 2 deletions

View File

@@ -136,7 +136,7 @@ public class CardInventoryRepository : ICardInventoryRepository
// Mutation phase via InventoryService transaction — freeplay-aware RedEther debit, // Mutation phase via InventoryService transaction — freeplay-aware RedEther debit,
// card grants with cosmetic cascade. // card grants with cosmetic cascade.
await using var tx = await _inv.BeginAsync(viewerId); await using var tx = await _inv.BeginAsync(viewerId, configure: cfg => cfg.Source = GrantSource.CardCraft);
var spendResult = await tx.TrySpendAsync(SpendCurrency.RedEther, (long)totalCost); var spendResult = await tx.TrySpendAsync(SpendCurrency.RedEther, (long)totalCost);
if (!spendResult.Success) if (!spendResult.Success)

View File

@@ -28,7 +28,8 @@ public enum GrantSource
AchievementReward = 13, AchievementReward = 13,
SerialCodeRedeem = 14, SerialCodeRedeem = 14,
CardCosmeticCascade = 15, CardCosmeticCascade = 15,
// Reserved high to stay visually distinct from gameplay sources; 1698 are intentionally unused. CardCraft = 16,
// Reserved high to stay visually distinct from gameplay sources; 1798 are intentionally unused.
AdminGrant = 99, AdminGrant = 99,
} }
@@ -57,6 +58,7 @@ public static class GrantSourceMessages
GrantSource.AchievementReward => "From achievement reward", GrantSource.AchievementReward => "From achievement reward",
GrantSource.SerialCodeRedeem => "From serial code", GrantSource.SerialCodeRedeem => "From serial code",
GrantSource.CardCosmeticCascade => "Card cosmetic", GrantSource.CardCosmeticCascade => "Card cosmetic",
GrantSource.CardCraft => "From card crafting",
GrantSource.AdminGrant => "From admin grant", GrantSource.AdminGrant => "From admin grant",
_ => throw new ArgumentOutOfRangeException(nameof(source), source, "Unhandled GrantSource"), _ => throw new ArgumentOutOfRangeException(nameof(source), source, "Unhandled GrantSource"),
}; };