Post a nice message when releasing funds
This commit is contained in:
parent
d060120c9b
commit
1ee39989af
|
@ -79,11 +79,8 @@ class Transactions(object):
|
|||
self.irc.client.channel, f"AUTO Incoming transaction: {amount}{currency} ({reference}) - {state} - {description}"
|
||||
)
|
||||
# Try getting the trade by the reference ID given
|
||||
print("REFERENCE", reference)
|
||||
stored_trade = self.get_ref(reference)
|
||||
print(f"STORED_TRADE {stored_trade}")
|
||||
if not stored_trade:
|
||||
print(f"NOT STORED TRADE {reference}")
|
||||
self.log.info(f"No reference in DB for {reference}", reference=reference)
|
||||
self.irc.client.msg(self.irc.client.channel, f"No reference in DB for {reference}")
|
||||
return
|
||||
|
@ -114,7 +111,8 @@ class Transactions(object):
|
|||
self.irc.client.msg(self.irc.client.channel, f"Account type is not Revolut: {account_type}")
|
||||
return
|
||||
self.irc.client.msg(self.irc.client.channel, f"All checks passed, releasing funds for {stored_trade['id']} / {reference}")
|
||||
rtrn = self.agora.release_funds(txid)
|
||||
rtrn = self.agora.release_funds(stored_trade["id"])
|
||||
self.agora.agora.contact_message_post(stored_trade["id"], "Thanks! Releasing now :)")
|
||||
self.irc.client.msg(self.irc.client.channel, dumps(rtrn))
|
||||
|
||||
def new_trade(self, trade_id, buyer, currency, amount, amount_xmr):
|
||||
|
@ -199,9 +197,7 @@ class Transactions(object):
|
|||
:rtype: string
|
||||
"""
|
||||
ref_data = r.hgetall(f"trade.{reference}")
|
||||
print(f"RETURN FROM GET_REF() {ref_data}")
|
||||
ref_data = convert(ref_data)
|
||||
print(f"CONVERTED IN GET_REF() {ref_data}")
|
||||
if not ref_data:
|
||||
return False
|
||||
return ref_data
|
||||
|
|
Loading…
Reference in New Issue