dkforest

A forum and chat platform (onion)
git clone https://git.dasho.dev/n0tr1v/dkforest.git
Log | Files | Refs | LICENSE

commit a2fbec36d73ff99236c9aa5b8eebecdc868faec3
parent f866aa18855118a1c6faf2f7c093ba4c24d3bccf
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Wed, 27 Dec 2023 01:54:11 -0500

fix

Diffstat:
Mpkg/web/handlers/poker/poker.go | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pkg/web/handlers/poker/poker.go b/pkg/web/handlers/poker/poker.go @@ -1462,13 +1462,14 @@ func applyGains(g *Game, playersGain []PlayerGain, mainPot, rake database.PokerC rakeBackMap := make(map[database.UserID]database.PokerChip) for _, p := range g.ongoing.players { if p.pokerReferredBy != nil { - rakeBack := database.PokerChip(RakeBackPct * float64(p.rakePaid)) + rakeBack := database.PokerChip(math.RoundToEven(RakeBackPct * float64(p.rakePaid))) rakeBackMap[*p.pokerReferredBy] += rakeBack rake -= rakeBack } } for userID, totalRakeBack := range rakeBackMap { if err := tx.IncrUserRakeBack(userID, totalRakeBack); err != nil { + logrus.Error(err) rake += totalRakeBack } }