Finish implementation and tests for the cheat system #3
|
@ -167,7 +167,12 @@ class Agora(object):
|
||||||
contact_id = contact["data"]["contact_id"]
|
contact_id = contact["data"]["contact_id"]
|
||||||
buyer = contact["data"]["buyer"]["username"]
|
buyer = contact["data"]["buyer"]["username"]
|
||||||
amount = contact["data"]["amount"]
|
amount = contact["data"]["amount"]
|
||||||
amount_xmr = contact["data"]["amount_xmr"]
|
if "amount_xmr" in contact["data"]:
|
||||||
|
amount_crypto = contact["data"]["amount_xmr"]
|
||||||
|
crypto = "XMR"
|
||||||
|
elif "amount_btc" in contact["data"]:
|
||||||
|
amount_crypto = contact["data"]["amount_btc"]
|
||||||
|
crypto = "BTC"
|
||||||
currency = contact["data"]["currency"]
|
currency = contact["data"]["currency"]
|
||||||
release_url = contact["actions"]["release_url"]
|
release_url = contact["actions"]["release_url"]
|
||||||
if not contact["data"]["is_selling"]:
|
if not contact["data"]["is_selling"]:
|
||||||
|
@ -175,7 +180,7 @@ class Agora(object):
|
||||||
reference = self.tx.tx_to_ref(contact_id)
|
reference = self.tx.tx_to_ref(contact_id)
|
||||||
if not reference:
|
if not reference:
|
||||||
reference = "not_set"
|
reference = "not_set"
|
||||||
dash_tmp.append(f"{reference}: {buyer} {amount}{currency} {amount_xmr}XMR {release_url}")
|
dash_tmp.append(f"{reference}: {buyer} {amount}{currency} {amount_crypto}{crypto} {release_url}")
|
||||||
|
|
||||||
return dash_tmp
|
return dash_tmp
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue