dkforest

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

commit 159578f5478cbd1a74b13ecdb5b8f7d7f96f2889
parent 1cff8aca725623d51313a637e518798a58891056
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Wed, 13 Dec 2023 21:06:32 -0500

fix

Diffstat:
Mpkg/web/handlers/handlers.go | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkg/web/handlers/handlers.go b/pkg/web/handlers/handlers.go @@ -794,14 +794,14 @@ func PokerHomeHandler(c echo.Context) error { data.Error = "cannot withdraw to the deposit address" return c.Render(http.StatusOK, "poker", data) } - withdrawAmount := data.WithdrawAmount * 1_000_000_000_000 + withdrawAmount := data.WithdrawAmount if withdrawAmount < minWithdrawAmount { data.Error = fmt.Sprintf("minimum withdraw amount is %d", minWithdrawAmount) return c.Render(http.StatusOK, "poker", data) } userChips := authUser.XmrBalanceStagenet if withdrawAmount > userChips { - data.Error = fmt.Sprintf("maximum withdraw amount is %d chips", userChips) + data.Error = fmt.Sprintf("maximum withdraw amount is %d (%d)", userChips, withdrawAmount) return c.Render(http.StatusOK, "poker", data) } withdrawAmount = utils.Clamp(withdrawAmount, minWithdrawAmount, userChips)