Pass the real bank details after verification
This commit is contained in:
parent
ac140f6aee
commit
680c974437
|
@ -465,7 +465,6 @@ class Transactions(util.Base):
|
||||||
self.log.info(f"User has completed verification: {uid}")
|
self.log.info(f"User has completed verification: {uid}")
|
||||||
trade_list = self.find_trades_by_uid(uid)
|
trade_list = self.find_trades_by_uid(uid)
|
||||||
for platform, trade_id, reference, currency in trade_list:
|
for platform, trade_id, reference, currency in trade_list:
|
||||||
self.log.info(f"Sending bank details/reference for {platform}/{reference}")
|
|
||||||
self.send_bank_details(platform, currency, trade_id)
|
self.send_bank_details(platform, currency, trade_id)
|
||||||
self.send_reference(platform, trade_id, reference)
|
self.send_reference(platform, trade_id, reference)
|
||||||
|
|
||||||
|
@ -518,9 +517,10 @@ class Transactions(util.Base):
|
||||||
Send the bank details to a trade.
|
Send the bank details to a trade.
|
||||||
"""
|
"""
|
||||||
send_setting, post_message = self.get_send_settings(platform)
|
send_setting, post_message = self.get_send_settings(platform)
|
||||||
|
self.log.info(f"Sending bank details/reference for {platform}/{trade_id}")
|
||||||
if send_setting == "1":
|
if send_setting == "1":
|
||||||
account_info = self.markets.get_matching_account_details(platform, currency)
|
account_info = self.markets.get_matching_account_details(platform, currency)
|
||||||
formatted_account_info = self.markets.format_payment_details(currency, account_info)
|
formatted_account_info = self.markets.format_payment_details(currency, account_info, real=True)
|
||||||
print("formatted", formatted_account_info)
|
print("formatted", formatted_account_info)
|
||||||
post_message(
|
post_message(
|
||||||
trade_id,
|
trade_id,
|
||||||
|
@ -546,7 +546,6 @@ class Transactions(util.Base):
|
||||||
reference = f"PGN-{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)
|
|
||||||
to_store = {
|
to_store = {
|
||||||
"id": trade_id,
|
"id": trade_id,
|
||||||
"tx": "",
|
"tx": "",
|
||||||
|
@ -561,6 +560,7 @@ class Transactions(util.Base):
|
||||||
}
|
}
|
||||||
self.log.info(f"Storing trade information: {str(to_store)}")
|
self.log.info(f"Storing trade information: {str(to_store)}")
|
||||||
r.hmset(f"trade.{reference}", to_store)
|
r.hmset(f"trade.{reference}", to_store)
|
||||||
|
r.set(f"trade.{trade_id}.reference", reference)
|
||||||
self.irc.sendmsg(f"Generated reference for {trade_id}: {reference}")
|
self.irc.sendmsg(f"Generated reference for {trade_id}: {reference}")
|
||||||
self.ux.notify.notify_new_trade(amount, currency)
|
self.ux.notify.notify_new_trade(amount, currency)
|
||||||
uid = self.create_uid(subclass, buyer)
|
uid = self.create_uid(subclass, buyer)
|
||||||
|
@ -569,10 +569,8 @@ class Transactions(util.Base):
|
||||||
if verified != "GREEN":
|
if verified != "GREEN":
|
||||||
self.log.info(f"UID {uid} is not verified, sending link.")
|
self.log.info(f"UID {uid} is not verified, sending link.")
|
||||||
self.send_verification_url(subclass, uid, trade_id)
|
self.send_verification_url(subclass, uid, trade_id)
|
||||||
return
|
|
||||||
else: # User is verified
|
else: # User is verified
|
||||||
self.log.info(f"UID {uid} is verified.")
|
self.log.info(f"UID {uid} is verified.")
|
||||||
self.log.info(f"Sending bank details/reference for {subclass}/{reference}")
|
|
||||||
self.send_bank_details(subclass, currency, trade_id)
|
self.send_bank_details(subclass, currency, trade_id)
|
||||||
self.send_reference(subclass, trade_id, reference)
|
self.send_reference(subclass, trade_id, reference)
|
||||||
if existing_ref:
|
if existing_ref:
|
||||||
|
|
Loading…
Reference in New Issue