commit b45019ec4a6edb21b49b0e76fc1f76104004aab2
parent f042648a87831a3063a23aaf64d7324f6ca81d39
Author: n0tr1v <n0tr1v@protonmail.com>
Date: Thu, 14 Dec 2023 15:46:20 -0500
notifs on deposit
Diffstat:
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/pkg/actions/actions.go b/pkg/actions/actions.go
@@ -7,6 +7,7 @@ import (
"dkforest/pkg/color"
"dkforest/pkg/config"
"dkforest/pkg/database"
+ dutils "dkforest/pkg/database/utils"
"dkforest/pkg/managers"
"dkforest/pkg/utils"
"dkforest/pkg/web"
@@ -243,6 +244,12 @@ func xmrWatch(db *database.DkfDB) {
if transfer.Confirmations < 10 {
continue
}
+
+ zeroUser := dutils.GetZeroUser(db)
+ rootAdminID := database.UserID(config.RootAdminID)
+ msg := fmt.Sprintf("new deposit %s xmr by %s", pokerTransfer.Amount.XmrStr(), user.Username)
+ _, _ = db.CreateMsg(msg, msg, "", config.GeneralRoomID, zeroUser.ID, &rootAdminID)
+
tx := db.Begin()
if err := user.IncrXmrBalanceStagenet(tx, pokerTransfer.Amount); err != nil {
logrus.Error(err)