Fix getting transactions

This commit is contained in:
Mark Veidemanis 2022-03-24 20:12:23 +00:00
parent 7b38e487cf
commit 49b1f0ea52
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 4 additions and 3 deletions

View File

@ -534,7 +534,8 @@ 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():
for name, accounts in accounts.items():
for account in accounts:
msg(f"{name} {account['account_id']} {account['details']} {account['currency']}")
class transactions(object):
@ -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"]