Add balance command

This commit is contained in:
Mark Veidemanis 2022-06-14 08:19:21 +01:00
parent 848130d2ce
commit 74f5fca9ab
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 10 additions and 0 deletions

View File

@ -1009,3 +1009,13 @@ class IRCCommands(object):
uid = tx.ux.verify.create_uid(platform, username) uid = tx.ux.verify.create_uid(platform, username)
first, last = tx.ux.verify.get_external_user_id_details(uid) first, last = tx.ux.verify.get_external_user_id_details(uid)
msg(f"Name: {first} {last}") msg(f"Name: {first} {last}")
class balance(object):
name = "balance"
authed = True
helptext = "Get the total balance of all fiat accounts."
@staticmethod
def run(cmd, spl, length, authed, msg, agora, tx, ux):
total = ux.sinks.get_total_usd()
msg(f"Fiat balance (USD): {total}")