From 49b1f0ea52f62a726a346894a57628ec4b116774 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Thu, 24 Mar 2022 20:12:23 +0000 Subject: [PATCH] Fix getting transactions --- handler/ux/commands.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/handler/ux/commands.py b/handler/ux/commands.py index c66e55a..f7936ef 100644 --- a/handler/ux/commands.py +++ b/handler/ux/commands.py @@ -534,8 +534,9 @@ class IRCCommands(object): def run(cmd, spl, length, authed, msg, agora, tx, ux): if length == 1: accounts = tx.sinks.nordigen.get_all_account_info() - for name, account in accounts.items(): - msg(f"{name} {account['account_id']} {account['details']} {account['currency']}") + for name, accounts in accounts.items(): + for account in accounts: + msg(f"{name} {account['account_id']} {account['details']} {account['currency']}") class transactions(object): name = "transactions" @@ -550,7 +551,7 @@ class IRCCommands(object): transactions = tx.sinks.truelayer.get_transactions(account, account_id) for transaction in transactions: txid = transaction["transaction_id"] - ptxid = transaction["provider_transaction_id"] + ptxid = transaction["meta"]["provider_transaction_id"] txtype = transaction["transaction_type"] timestamp = transaction["timestamp"] amount = transaction["amount"]