Don't message if trade release failed
This commit is contained in:
parent
0094da841e
commit
a69a585c71
|
@ -186,10 +186,17 @@ class Transactions(util.Base):
|
|||
self.ux.notify.notify_complete_trade(amount, currency)
|
||||
|
||||
def release_funds(self, trade_id, reference):
|
||||
self.log.info(f"All checks passed, releasing funds for {trade_id} {reference}")
|
||||
self.irc.sendmsg(f"All checks passed, releasing funds for {trade_id} / {reference}")
|
||||
logmessage = f"All checks passed, releasing funds for {trade_id} {reference}"
|
||||
self.log.info(logmessage)
|
||||
self.irc.sendmsg(logmessage)
|
||||
rtrn = self.agora.release_funds(trade_id)
|
||||
self.agora.agora.contact_message_post(trade_id, "Thanks! Releasing now :)")
|
||||
if rtrn["message"] == "OK":
|
||||
self.agora.agora.contact_message_post(trade_id, "Thanks! Releasing now :)")
|
||||
else:
|
||||
logmessage = f"Release funds unsuccessful: {rtrn['message']}"
|
||||
self.log.error(logmessage)
|
||||
self.irc.sendmsg(logmessage)
|
||||
return
|
||||
|
||||
# Parse the escrow release response
|
||||
message = rtrn["message"]
|
||||
|
|
Loading…
Reference in New Issue