From 9200d0db9bc06991978315cbc31b3361e1092778 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Tue, 14 Jun 2022 17:14:00 +0100 Subject: [PATCH] Handle sender in reference separated by double spaces --- handler/lib/transactions.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/handler/lib/transactions.py b/handler/lib/transactions.py index 1efdf5d..c14c540 100644 --- a/handler/lib/transactions.py +++ b/handler/lib/transactions.py @@ -65,6 +65,14 @@ class Transactions(util.Base): elif "meta" in data: if "debtor_account_name" in data["meta"]: return data["meta"]["debtor_account_name"] + elif " " in data["reference"]: + refsplit = data["reference"].split(" ") + if not len(refsplit) == 2: + self.log.error(f"Sender cannot be extracted: {data}") + return "not_set" + realname, part2 = data["reference"].split(" ") + return realname + return "not_set" def reference_partial_check(self, reference, txid, currency, amount):