Skip to content

Commit 80f56d8

Browse files
harisangfhenneke
andauthored
Update src/monitoring_tests/price_sensitivity_test.py
Co-authored-by: Felix Henneke <felix.henneke@protonmail.com>
1 parent b42c69a commit 80f56d8

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/monitoring_tests/price_sensitivity_test.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,8 @@ def check_prices(self, competition_data: dict[str, Any]) -> bool:
4848
native_prices[sell_token], native_prices[buy_token]
4949
)
5050

51-
if ucp_rate > native_price_rate:
52-
max_rate = ucp_rate
53-
min_rate = native_price_rate
54-
else:
55-
max_rate = native_price_rate
56-
min_rate = ucp_rate
51+
max_rate = max(ucp_rate, native_price_rate)
52+
min_rate = min(ucp_rate, native_price_rate)
5753

5854
if max_rate > (1 + UCP_VS_NATIVE_SENSITIVITY_THRESHOLD) * min_rate:
5955
log_output = "\t".join(

0 commit comments

Comments
 (0)