Skip to content

Commit c9608be

Browse files
committed
Update commands.py
1 parent e06010a commit c9608be

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/tgbot/handlers/treasury/commands.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
from src.tgbot.handlers.treasury.constants import PAYOUTS, TrxType
88
from src.tgbot.handlers.treasury.service import (
99
get_leaderboard,
10+
get_token_supply,
1011
get_user_balance,
1112
get_user_place_in_leaderboard,
12-
get_token_supply,
1313
)
1414
from src.tgbot.senders.utils import get_random_emoji
1515

@@ -75,6 +75,9 @@ async def handle_show_leaderbaord(
7575
nick = user["nickname"] or get_random_emoji() * 3
7676
LEADERBOARD_TEXT += f"{icon} - {nick} - {user['balance']} 🍔\n"
7777

78+
tokens = await get_token_supply()
79+
LEADERBOARD_TEXT += f"\nTotal supply: {tokens} 🍔"
80+
7881
user_lb_data = await get_user_place_in_leaderboard(update.effective_user.id)
7982
if user_lb_data:
8083
place, nickname, balance = (
@@ -95,9 +98,6 @@ async def handle_show_leaderbaord(
9598
"To see your place in the leaderboard, set your /nickname ⬅️\n\n"
9699
)
97100

98-
tokens = await get_token_supply()
99-
LEADERBOARD_TEXT += f"\n Total supply: {tokens} 🍔"
100-
101101
return await update.message.reply_text(LEADERBOARD_TEXT, parse_mode=ParseMode.HTML)
102102

103103

0 commit comments

Comments
 (0)