Skip to content

Commit

Permalink
Update commands.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ohld committed Jun 9, 2024
1 parent e06010a commit c9608be
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/tgbot/handlers/treasury/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
from src.tgbot.handlers.treasury.constants import PAYOUTS, TrxType
from src.tgbot.handlers.treasury.service import (
get_leaderboard,
get_token_supply,
get_user_balance,
get_user_place_in_leaderboard,
get_token_supply,
)
from src.tgbot.senders.utils import get_random_emoji

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

tokens = await get_token_supply()
LEADERBOARD_TEXT += f"\nTotal supply: {tokens} 🍔"

user_lb_data = await get_user_place_in_leaderboard(update.effective_user.id)
if user_lb_data:
place, nickname, balance = (
Expand All @@ -95,9 +98,6 @@ async def handle_show_leaderbaord(
"To see your place in the leaderboard, set your /nickname ⬅️\n\n"
)

tokens = await get_token_supply()
LEADERBOARD_TEXT += f"\n Total supply: {tokens} 🍔"

return await update.message.reply_text(LEADERBOARD_TEXT, parse_mode=ParseMode.HTML)


Expand Down

0 comments on commit c9608be

Please sign in to comment.