commit 94b3cf29ee0ad2c6d5f5c300e4862f9ddaafde42
parent b6751469ef5ed80d7a3c66b9ab24a55cfa615dce
Author: n0tr1v <n0tr1v@protonmail.com>
Date: Wed, 13 Dec 2023 17:16:03 -0500
prevent user from withdrawing to deposit address
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/pkg/web/handlers/handlers.go b/pkg/web/handlers/handlers.go
@@ -790,6 +790,10 @@ func PokerHomeHandler(c echo.Context) error {
data.Error = "invalid xmr address"
return c.Render(http.StatusOK, "poker", data)
}
+ if data.WithdrawAddress == authUser.PokerXmrSubAddress {
+ data.Error = "cannot withdraw to the deposit address"
+ return c.Render(http.StatusOK, "poker", data)
+ }
withdrawAmount := data.WithdrawAmount
if withdrawAmount < minWithdrawAmount {
data.Error = "minimum withdraw amount is 100 chips"