Don't modify the balance directly

This commit is contained in:
barelyprofessional
2026-01-05 00:28:28 -06:00
parent 19571d54e7
commit 9077e629be

View File

@@ -358,7 +358,8 @@ public class BlackjackCommand : ICommand
// Double the wager
var additionalWager = wager.WagerAmount;
gambler.Balance -= additionalWager;
await Money.ModifyBalanceAsync(gambler.Id, -additionalWager, TransactionSourceEventType.Gambling,
$"Double down for {wager.Id}", ct: ctx);
wager.WagerAmount *= 2;
wager.WagerEffect -= additionalWager; // Subtract the additional wager
gameState.HasDoubledDown = true;