Add the recipient to the account details

This commit is contained in:
2022-04-21 20:45:27 +01:00
parent 7f51c7cb4b
commit 7d9679f2d5
3 changed files with 17 additions and 0 deletions

View File

@@ -247,11 +247,13 @@ class Nordigen(util.Base):
if "bban" in parsed and parsed["currency"] == "GBP":
sort_code = parsed["bban"][0:6]
account_number = parsed["bban"][6:]
recipient = parsed["ownerName"]
del parsed["bban"]
del parsed["iban"]
sort_code = "-".join(list(map("".join, zip(*[iter(sort_code)] * 2))))
parsed["sort_code"] = sort_code
parsed["number"] = account_number
parsed["recipient"] = recipient
# Let's add the account ID so we can reference it later
parsed["account_id"] = account_id
return parsed