From 74f5fca9ab3832554e90723db7c27db20a1e657d Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Tue, 14 Jun 2022 08:19:21 +0100 Subject: [PATCH] Add balance command --- handler/ux/commands.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/handler/ux/commands.py b/handler/ux/commands.py index 7cbe41e..6ddeee8 100644 --- a/handler/ux/commands.py +++ b/handler/ux/commands.py @@ -1009,3 +1009,13 @@ class IRCCommands(object): uid = tx.ux.verify.create_uid(platform, username) first, last = tx.ux.verify.get_external_user_id_details(uid) 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}")