|
|
@ -901,7 +901,7 @@ class LocalPlatformClient(ABC):
|
|
|
|
"ad_id": ad_id,
|
|
|
|
"ad_id": ad_id,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
log.info(f"Storing trade information: {str(trade_cast)}")
|
|
|
|
log.info(f"Storing trade information: {str(trade_cast)}")
|
|
|
|
trade = self.instance.new_trade(trade_cast)
|
|
|
|
self.instance.new_trade(trade_cast)
|
|
|
|
# await db.r.hmset(f"trade.{reference}", to_store)
|
|
|
|
# await db.r.hmset(f"trade.{reference}", to_store)
|
|
|
|
# await db.r.set(f"trade.{trade_id}.reference", reference)
|
|
|
|
# await db.r.set(f"trade.{trade_id}.reference", reference)
|
|
|
|
message = f"Generated reference for {trade_id}: {reference}"
|
|
|
|
message = f"Generated reference for {trade_id}: {reference}"
|
|
|
@ -915,12 +915,13 @@ class LocalPlatformClient(ABC):
|
|
|
|
# else: # User is verified
|
|
|
|
# else: # User is verified
|
|
|
|
# log.info(f"UID {uid} is verified.")
|
|
|
|
# log.info(f"UID {uid} is verified.")
|
|
|
|
ad_obj = self.instance.get_ad(ad_id)
|
|
|
|
ad_obj = self.instance.get_ad(ad_id)
|
|
|
|
if not ad_obj:
|
|
|
|
if ad_obj:
|
|
|
|
log.error(f"Could not get ad object for {ad_id}.")
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await self.send_bank_details(currency, trade_id, ad_obj)
|
|
|
|
await self.send_bank_details(currency, trade_id, ad_obj)
|
|
|
|
await self.send_reference(trade_id, reference)
|
|
|
|
await self.send_reference(trade_id, reference)
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
log.warning(f"Could not get ad object for {ad_id}.")
|
|
|
|
|
|
|
|
# return
|
|
|
|
|
|
|
|
|
|
|
|
if existing_ref:
|
|
|
|
if existing_ref:
|
|
|
|
return existing_ref
|
|
|
|
return existing_ref
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|