|
|
@ -193,7 +193,7 @@ class Transactions(util.Base):
|
|
|
|
Store details in Redis, generate a reference and optionally let the customer know the reference.
|
|
|
|
Store details in Redis, generate a reference and optionally let the customer know the reference.
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
reference = "".join(choices(ascii_uppercase, k=5))
|
|
|
|
reference = "".join(choices(ascii_uppercase, k=5))
|
|
|
|
reference = f"{asset}-{reference}"
|
|
|
|
reference = f"PGN-{reference}"
|
|
|
|
existing_ref = r.get(f"trade.{trade_id}.reference")
|
|
|
|
existing_ref = r.get(f"trade.{trade_id}.reference")
|
|
|
|
if not existing_ref:
|
|
|
|
if not existing_ref:
|
|
|
|
r.set(f"trade.{trade_id}.reference", reference)
|
|
|
|
r.set(f"trade.{trade_id}.reference", reference)
|
|
|
|