Add extra tests for transactions fields
This commit is contained in:
@@ -78,6 +78,10 @@ class Transactions(util.Base):
|
|||||||
ts = data["timestamp"]
|
ts = data["timestamp"]
|
||||||
txid = data["transaction_id"]
|
txid = data["transaction_id"]
|
||||||
txtype = data["transaction_type"]
|
txtype = data["transaction_type"]
|
||||||
|
if "amount" not in data:
|
||||||
|
return
|
||||||
|
if "currency" not in data:
|
||||||
|
return
|
||||||
amount = data["amount"]
|
amount = data["amount"]
|
||||||
if amount <= 0:
|
if amount <= 0:
|
||||||
self.log.info(f"Ignoring transaction with negative/zero amount: {txid}")
|
self.log.info(f"Ignoring transaction with negative/zero amount: {txid}")
|
||||||
@@ -189,7 +193,7 @@ class Transactions(util.Base):
|
|||||||
|
|
||||||
# Parse the escrow release response
|
# Parse the escrow release response
|
||||||
message = rtrn["message"]
|
message = rtrn["message"]
|
||||||
#message_long = rtrn["response"]["data"]["message"]
|
# message_long = rtrn["response"]["data"]["message"]
|
||||||
self.irc.sendmsg(f"{dumps(message)}")
|
self.irc.sendmsg(f"{dumps(message)}")
|
||||||
|
|
||||||
def new_trade(self, asset, trade_id, buyer, currency, amount, amount_crypto, provider):
|
def new_trade(self, asset, trade_id, buyer, currency, amount, amount_crypto, provider):
|
||||||
|
|||||||
Reference in New Issue
Block a user