commit a27ac2cfb2d0ca1ceba1fb5a24cb04cbb6d9302b
parent e9aa1df7f2cb2f8fc2aa4147fc550937cd2167bd
Author: n0tr1v <n0tr1v@protonmail.com>
Date: Wed, 27 Dec 2023 12:16:10 -0500
cleanup
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pkg/web/handlers/poker/poker.go b/pkg/web/handlers/poker/poker.go
@@ -1455,12 +1455,12 @@ func applyRake(g *Game, tx *database.DkfDB, rake database.PokerChip) {
if p.pokerReferredBy != nil {
rakeBack := database.PokerChip(math.RoundToEven(RakeBackPct * float64(p.rakePaid)))
rakeBackMap[*p.pokerReferredBy] += rakeBack
- rake -= rakeBack
}
}
casinoRakeBack := database.PokerChip(0)
for userID, totalRakeBack := range rakeBackMap {
casinoRakeBack += totalRakeBack
+ rake -= totalRakeBack
if err := tx.IncrUserRakeBack(userID, totalRakeBack); err != nil {
logrus.Error(err)
casinoRakeBack -= totalRakeBack