@@ -43,10 +43,9 @@ def test_convert_notional_to_chain_format(self, inj_usdt_spot_market: SpotMarket
4343 chain_value = inj_usdt_spot_market .notional_to_chain_format (human_readable_value = original_notional )
4444 notional_decimals = inj_usdt_spot_market .quote_token .decimals
4545 expected_value = original_notional * Decimal (f"1e{ notional_decimals } " )
46- quantized_value = (expected_value // inj_usdt_spot_market .min_notional ) * inj_usdt_spot_market .min_notional
47- quantized_chain_format_value = quantized_value * Decimal (f"1e{ ADDITIONAL_CHAIN_FORMAT_DECIMALS } " )
46+ expected_chain_format_value = expected_value * Decimal (f"1e{ ADDITIONAL_CHAIN_FORMAT_DECIMALS } " )
4847
49- assert quantized_chain_format_value == chain_value
48+ assert expected_chain_format_value == chain_value
5049
5150 def test_convert_quantity_from_chain_format (self , inj_usdt_spot_market : SpotMarket ):
5251 expected_quantity = Decimal ("123.456" )
@@ -157,10 +156,9 @@ def test_convert_notional_to_chain_format(self, btc_usdt_perp_market: Derivative
157156 chain_value = btc_usdt_perp_market .notional_to_chain_format (human_readable_value = original_notional )
158157 notional_decimals = btc_usdt_perp_market .quote_token .decimals
159158 expected_value = original_notional * Decimal (f"1e{ notional_decimals } " )
160- quantized_value = (expected_value // btc_usdt_perp_market .min_notional ) * btc_usdt_perp_market .min_notional
161- quantized_chain_format_value = quantized_value * Decimal (f"1e{ ADDITIONAL_CHAIN_FORMAT_DECIMALS } " )
159+ expected_chain_format_value = expected_value * Decimal (f"1e{ ADDITIONAL_CHAIN_FORMAT_DECIMALS } " )
162160
163- assert quantized_chain_format_value == chain_value
161+ assert expected_chain_format_value == chain_value
164162
165163 def test_convert_quantity_from_chain_format (self , btc_usdt_perp_market : DerivativeMarket ):
166164 expected_quantity = Decimal ("123.456" )
@@ -430,10 +428,9 @@ def test_convert_notional_to_chain_format(self, first_match_bet_market: BinaryOp
430428 chain_value = first_match_bet_market .notional_to_chain_format (human_readable_value = original_notional )
431429 notional_decimals = first_match_bet_market .quote_token .decimals
432430 expected_value = original_notional * Decimal (f"1e{ notional_decimals } " )
433- quantized_value = (expected_value // first_match_bet_market .min_notional ) * first_match_bet_market .min_notional
434- quantized_chain_format_value = quantized_value * Decimal (f"1e{ ADDITIONAL_CHAIN_FORMAT_DECIMALS } " )
431+ expected_chain_format_value = expected_value * Decimal (f"1e{ ADDITIONAL_CHAIN_FORMAT_DECIMALS } " )
435432
436- assert quantized_chain_format_value == chain_value
433+ assert expected_chain_format_value == chain_value
437434
438435 def test_convert_quantity_from_chain_format_with_fixed_denom (self , first_match_bet_market : BinaryOptionMarket ):
439436 original_quantity = Decimal ("123.456789" )
0 commit comments