From a7a2bb729ce7a42e119343c0837042a469850dc3 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Sat, 9 Apr 2022 20:03:56 +0100 Subject: [PATCH] Better format for ntransactions --- handler/ux/commands.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/handler/ux/commands.py b/handler/ux/commands.py index 5e0fac7..ea97760 100644 --- a/handler/ux/commands.py +++ b/handler/ux/commands.py @@ -579,15 +579,12 @@ class IRCCommands(object): account_id = spl[1] transactions = tx.sinks.nordigen.get_transactions(account_id) for transaction in transactions: - msg(dumps(transaction)) - # txid = transaction["transaction_id"] - # ptxid = transaction["meta"]["provider_transaction_id"] - # txtype = transaction["transaction_type"] - # timestamp = transaction["timestamp"] - # amount = transaction["amount"] - # currency = transaction["currency"] - # description = transaction["description"] - # msg(f"{timestamp} {txid} {ptxid} {txtype} {amount}{currency} {description}") + txid = transaction["transaction_id"] + timestamp = transaction["timestamp"] + amount = transaction["amount"] + currency = transaction["currency"] + reference = transaction["reference"] + msg(f"{timestamp} {txid} {amount}{currency} {reference}") class mapaccount(object): name = "mapaccount"