From 6a130592b66c29050622daa7eb66a5dbab8f70da Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Mon, 11 Apr 2022 20:57:47 +0100 Subject: [PATCH] Allow blank senders for first attempts --- handler/transactions.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/handler/transactions.py b/handler/transactions.py index 61db9e9..243d30a 100644 --- a/handler/transactions.py +++ b/handler/transactions.py @@ -222,6 +222,8 @@ class Transactions(util.Base): """ key = f"namemap.{platform}.{platform_buyer}" senders = r.smembers(key) + if not senders: + return None senders = util.convert(senders) return senders @@ -238,6 +240,9 @@ class Transactions(util.Base): :rtype: bool """ senders = self.get_previous_senders(platform, platform_buyer) + if senders is None: # no senders yet, assume it's valid + print("Senders is none, assuming its a valid TX!") + return True if platform_buyer in senders: print("Platform buyer is in senders!") return True