Libraries refactor and add some sinks #4
|
@ -95,11 +95,16 @@ class Agora(object):
|
||||||
reference = self.tx.tx_to_ref(contact_id)
|
reference = self.tx.tx_to_ref(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"]
|
||||||
if not contact["data"]["is_selling"]:
|
if not contact["data"]["is_selling"]:
|
||||||
continue
|
continue
|
||||||
rtrn.append(f"{reference}: {buyer} {amount}{currency} {amount_xmr}XMR")
|
rtrn.append(f"{reference}: {buyer} {amount}{currency} {amount_crypto}{crypto}")
|
||||||
return rtrn
|
return rtrn
|
||||||
|
|
||||||
def dashboard_hook(self, dash):
|
def dashboard_hook(self, dash):
|
||||||
|
|
Loading…
Reference in New Issue