fix: user
This commit is contained in:
@@ -51,7 +51,8 @@ def is_fee_tolerant_transit_pair(tx_a: TransactionRecord, tx_b: TransactionRecor
|
||||
amount_b = float(tx_b.amount or 0)
|
||||
if amount_a <= 0 or amount_b <= 0:
|
||||
return False
|
||||
if _amount_ratio_diff(amount_a, amount_b) > FEE_TOLERANCE_RATIO:
|
||||
diff_ratio = _amount_ratio_diff(amount_a, amount_b)
|
||||
if diff_ratio > FEE_TOLERANCE_RATIO:
|
||||
return False
|
||||
|
||||
time_a = tx_a.trade_time
|
||||
@@ -59,7 +60,8 @@ def is_fee_tolerant_transit_pair(tx_a: TransactionRecord, tx_b: TransactionRecor
|
||||
if not isinstance(time_a, datetime) or not isinstance(time_b, datetime):
|
||||
return False
|
||||
try:
|
||||
return abs((time_a - time_b).total_seconds()) <= FEE_TRANSIT_WINDOW_SECONDS
|
||||
seconds_gap = abs((time_a - time_b).total_seconds())
|
||||
return seconds_gap <= FEE_TRANSIT_WINDOW_SECONDS
|
||||
except TypeError:
|
||||
return False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user