mirror of
https://git.wownero.com/lza_menace/tg-bot.git
synced 2024-08-15 00:23:12 +00:00
fix user outputs
This commit is contained in:
parent
3d5e316f75
commit
84529899ec
1 changed files with 3 additions and 1 deletions
|
@ -11,4 +11,6 @@ from tipbot.helpers.decorators import wallet_rpc_required, log_event, registrati
|
||||||
def balance(update, context):
|
def balance(update, context):
|
||||||
u = db.User.get(telegram_id=update.message.from_user['id'])
|
u = db.User.get(telegram_id=update.message.from_user['id'])
|
||||||
balances = wownero.Wallet().balances(account=u.account_index)
|
balances = wownero.Wallet().balances(account=u.account_index)
|
||||||
update.message.reply_text(f'Available balance for {u.telegram_user}: {float(balances[1])} WOW ({float(balances[0])} WOW locked)')
|
unlocked = balances[1]
|
||||||
|
locked = balances[0] - balances[1]
|
||||||
|
update.message.reply_text(f'Available balance for {u.telegram_user}: {float(unlocked)} WOW ({float(locked)} WOW locked)')
|
||||||
|
|
Loading…
Reference in a new issue