Make test for None explicit

Make test for `None` explicit
This commit is contained in:
raphaelstar 2023-02-02 13:29:37 +01:00 committed by GitHub
parent 1d6738778b
commit 36f95fb35d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2731,7 +2731,7 @@ class Exchange:
pos = positions[0] pos = positions[0]
isolated_liq = pos['liquidationPrice'] isolated_liq = pos['liquidationPrice']
if isolated_liq: if isolated_liq is not None:
buffer_amount = abs(open_rate - isolated_liq) * self.liquidation_buffer buffer_amount = abs(open_rate - isolated_liq) * self.liquidation_buffer
isolated_liq = ( isolated_liq = (
isolated_liq - buffer_amount isolated_liq - buffer_amount