dkforest

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

commit 3d9a057662366025993115eeb6c62d246e039f74
parent e096d243de3be484e151a9afe4591b601c40907d
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Wed, 20 Dec 2023 22:09:43 -0500

admin

Diffstat:
Mpkg/database/tablePokerXmrTransactions.go | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/pkg/database/tablePokerXmrTransactions.go b/pkg/database/tablePokerXmrTransactions.go @@ -38,9 +38,12 @@ func (d *DkfDB) GetPokerXmrTransactionsSumIn() (out Piconero, err error) { } func (d *DkfDB) GetPokerXmrTransactionsSumOut() (out Piconero, err error) { - var tmp struct{ Amount Piconero } - err = d.db.Raw(`SELECT SUM(amount) AS amount FROM poker_xmr_transactions WHERE is_in = 0`).Scan(&tmp).Error - return tmp.Amount, err + var tmp struct { + Amount Piconero + Fee Piconero + } + err = d.db.Raw(`SELECT SUM(amount) AS amount SUM(fee) AS fee FROM poker_xmr_transactions WHERE is_in = 0`).Scan(&tmp).Error + return tmp.Amount + tmp.Fee, err } func (d *DkfDB) GetLastUserWithdrawPokerXmrTransaction(userID UserID) (out PokerXmrTransaction, err error) {