Allow blank senders for first attempts

This commit is contained in:
Mark Veidemanis 2022-04-11 20:57:47 +01:00
parent 94429d0aaa
commit 6a130592b6
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 5 additions and 0 deletions

View File

@ -222,6 +222,8 @@ class Transactions(util.Base):
""" """
key = f"namemap.{platform}.{platform_buyer}" key = f"namemap.{platform}.{platform_buyer}"
senders = r.smembers(key) senders = r.smembers(key)
if not senders:
return None
senders = util.convert(senders) senders = util.convert(senders)
return senders return senders
@ -238,6 +240,9 @@ class Transactions(util.Base):
:rtype: bool :rtype: bool
""" """
senders = self.get_previous_senders(platform, platform_buyer) 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: if platform_buyer in senders:
print("Platform buyer is in senders!") print("Platform buyer is in senders!")
return True return True