@@ -369,9 +369,9 @@ def order_data(
369369 is_market_order : Optional [bool ] = False ,
370370 ) -> injective_exchange_tx_pb .OrderData :
371371 """
372- This method is deprecated and will be removed soon. Please use `create_v2_order_data ` instead
372+ This method is deprecated and will be removed soon. Please use `create_order_data_v2 ` instead
373373 """
374- warn ("This method is deprecated. Use create_v2_order_data instead" , DeprecationWarning , stacklevel = 2 )
374+ warn ("This method is deprecated. Use create_order_data_v2 instead" , DeprecationWarning , stacklevel = 2 )
375375
376376 order_mask = self ._order_mask (is_conditional = is_conditional , is_buy = is_buy , is_market_order = is_market_order )
377377
@@ -391,10 +391,10 @@ def order_data_without_mask(
391391 cid : Optional [str ] = None ,
392392 ) -> injective_exchange_tx_pb .OrderData :
393393 """
394- This method is deprecated and will be removed soon. Please use `create_v2_order_data_without_mask ` instead
394+ This method is deprecated and will be removed soon. Please use `create_order_data_without_mask_v2 ` instead
395395 """
396396 warn (
397- "This method is deprecated. Use create_v2_order_data_without_mask instead" , DeprecationWarning , stacklevel = 2
397+ "This method is deprecated. Use create_order_data_without_mask_v2 instead" , DeprecationWarning , stacklevel = 2
398398 )
399399
400400 return injective_exchange_tx_pb .OrderData (
@@ -452,9 +452,9 @@ def spot_order(
452452 trigger_price : Optional [Decimal ] = None ,
453453 ) -> injective_exchange_pb .SpotOrder :
454454 """
455- This method is deprecated and will be removed soon. Please use `create_v2_spot_order ` instead
455+ This method is deprecated and will be removed soon. Please use `create_spot_order_v2 ` instead
456456 """
457- warn ("This method is deprecated. Use create_v2_spot_order instead" , DeprecationWarning , stacklevel = 2 )
457+ warn ("This method is deprecated. Use create_spot_order_v2 instead" , DeprecationWarning , stacklevel = 2 )
458458
459459 market = self .spot_markets [market_id ]
460460
@@ -532,9 +532,9 @@ def derivative_order(
532532 trigger_price : Optional [Decimal ] = None ,
533533 ) -> injective_exchange_pb .DerivativeOrder :
534534 """
535- This method is deprecated and will be removed soon. Please use `create_v2_derivative_order ` instead
535+ This method is deprecated and will be removed soon. Please use `create_derivative_order_v2 ` instead
536536 """
537- warn ("This method is deprecated. Use create_v2_derivative_order instead" , DeprecationWarning , stacklevel = 2 )
537+ warn ("This method is deprecated. Use create_derivative_order_v2 instead" , DeprecationWarning , stacklevel = 2 )
538538
539539 market = self .derivative_markets [market_id ]
540540
@@ -597,9 +597,9 @@ def binary_options_order(
597597 denom : Optional [Denom ] = None ,
598598 ) -> injective_exchange_pb .DerivativeOrder :
599599 """
600- This method is deprecated and will be removed soon. Please use `create_v2_binary_options_order ` instead
600+ This method is deprecated and will be removed soon. Please use `create_binary_options_order_v2 ` instead
601601 """
602- warn ("This method is deprecated. Use create_v2_binary_options_order instead" , DeprecationWarning , stacklevel = 2 )
602+ warn ("This method is deprecated. Use create_binary_options_order_v2 instead" , DeprecationWarning , stacklevel = 2 )
603603
604604 market = self .binary_option_markets [market_id ]
605605
@@ -717,8 +717,7 @@ def MsgSend(self, from_address: str, to_address: str, amount: float, denom: str)
717717 )
718718
719719 def msg_send (self , from_address : str , to_address : str , amount : int , denom : str ):
720- chain_amount = Token .convert_value_to_extended_decimal_format (value = Decimal (str (amount )))
721- coin = self .coin (amount = int (chain_amount ), denom = denom )
720+ coin = self .coin (amount = int (amount ), denom = denom )
722721
723722 return cosmos_bank_tx_pb .MsgSend (
724723 from_address = from_address ,
@@ -748,8 +747,7 @@ def msg_deposit(
748747 def msg_deposit_v2 (
749748 self , sender : str , subaccount_id : str , amount : int , denom : str
750749 ) -> injective_exchange_tx_v2_pb .MsgDeposit :
751- chain_amount = Token .convert_value_to_extended_decimal_format (value = Decimal (str (amount )))
752- coin = self .coin (amount = int (chain_amount ), denom = denom )
750+ coin = self .coin (amount = int (amount ), denom = denom )
753751
754752 return injective_exchange_tx_v2_pb .MsgDeposit (
755753 sender = sender ,
@@ -780,8 +778,7 @@ def msg_withdraw_v2(
780778 amount : int ,
781779 denom : str ,
782780 ) -> injective_exchange_tx_v2_pb .MsgWithdraw :
783- chain_amount = Token .convert_value_to_extended_decimal_format (value = Decimal (str (amount )))
784- coin = self .coin (amount = int (chain_amount ), denom = denom )
781+ coin = self .coin (amount = int (amount ), denom = denom )
785782
786783 return injective_exchange_tx_v2_pb .MsgWithdraw (
787784 sender = sender ,
@@ -1894,8 +1891,7 @@ def msg_subaccount_transfer_v2(
18941891 amount : int ,
18951892 denom : str ,
18961893 ) -> injective_exchange_tx_v2_pb .MsgSubaccountTransfer :
1897- chain_amount = Token .convert_value_to_extended_decimal_format (value = Decimal (str (amount )))
1898- amount_coin = self .coin (amount = int (chain_amount ), denom = denom )
1894+ amount_coin = self .coin (amount = int (amount ), denom = denom )
18991895
19001896 return injective_exchange_tx_v2_pb .MsgSubaccountTransfer (
19011897 sender = sender ,
@@ -1934,8 +1930,7 @@ def msg_external_transfer_v2(
19341930 amount : int ,
19351931 denom : str ,
19361932 ) -> injective_exchange_tx_v2_pb .MsgExternalTransfer :
1937- chain_amount = Token .convert_value_to_extended_decimal_format (value = Decimal (str (amount )))
1938- coin = self .coin (amount = int (chain_amount ), denom = denom )
1933+ coin = self .coin (amount = int (amount ), denom = denom )
19391934
19401935 return injective_exchange_tx_v2_pb .MsgExternalTransfer (
19411936 sender = sender ,
@@ -2131,13 +2126,13 @@ def msg_decrease_position_margin_v2(
21312126 market_id : str ,
21322127 amount : Decimal ,
21332128 ) -> injective_exchange_tx_v2_pb .MsgDecreasePositionMargin :
2134- additional_margin = Token .convert_value_to_extended_decimal_format (value = amount )
2129+ margin_to_remove = Token .convert_value_to_extended_decimal_format (value = amount )
21352130 return injective_exchange_tx_v2_pb .MsgDecreasePositionMargin (
21362131 sender = sender ,
21372132 source_subaccount_id = source_subaccount_id ,
21382133 destination_subaccount_id = destination_subaccount_id ,
21392134 market_id = market_id ,
2140- amount = f"{ additional_margin .normalize ():f} " ,
2135+ amount = f"{ margin_to_remove .normalize ():f} " ,
21412136 )
21422137
21432138 def msg_update_spot_market (
@@ -2324,8 +2319,7 @@ def msg_create_insurance_fund(
23242319 expiry : int ,
23252320 initial_deposit : int ,
23262321 ) -> injective_insurance_tx_pb .MsgCreateInsuranceFund :
2327- chain_initial_deposit = Token .convert_value_to_extended_decimal_format (value = Decimal (str (initial_deposit )))
2328- deposit = self .coin (amount = int (chain_initial_deposit ), denom = quote_denom )
2322+ deposit = self .coin (amount = int (initial_deposit ), denom = quote_denom )
23292323
23302324 return injective_insurance_tx_pb .MsgCreateInsuranceFund (
23312325 sender = sender ,
@@ -2365,8 +2359,7 @@ def msg_underwrite(
23652359 quote_denom : str ,
23662360 amount : int ,
23672361 ):
2368- chain_amount = Token .convert_value_to_extended_decimal_format (value = Decimal (str (amount )))
2369- coin = self .coin (amount = int (chain_amount ), denom = quote_denom )
2362+ coin = self .coin (amount = int (amount ), denom = quote_denom )
23702363
23712364 return injective_insurance_tx_pb .MsgUnderwrite (
23722365 sender = sender ,
@@ -2426,10 +2419,8 @@ def MsgSendToEth(self, denom: str, sender: str, eth_dest: str, amount: float, br
24262419 )
24272420
24282421 def msg_send_to_eth (self , denom : str , sender : str , eth_dest : str , amount : int , bridge_fee : int ):
2429- chain_amount = Token .convert_value_to_extended_decimal_format (value = Decimal (str (amount )))
2430- chain_bridge_fee = Token .convert_value_to_extended_decimal_format (value = Decimal (str (bridge_fee )))
2431- amount_coin = self .coin (amount = int (chain_amount ), denom = denom )
2432- bridge_fee_coin = self .coin (amount = int (chain_bridge_fee ), denom = denom )
2422+ amount_coin = self .coin (amount = int (amount ), denom = denom )
2423+ bridge_fee_coin = self .coin (amount = int (bridge_fee ), denom = denom )
24332424
24342425 return injective_peggy_tx_pb .MsgSendToEth (
24352426 sender = sender ,
@@ -3029,9 +3020,9 @@ def _basic_derivative_order(
30293020 chain_trigger_price : Optional [Decimal ] = None ,
30303021 ) -> injective_exchange_pb .DerivativeOrder :
30313022 """
3032- This method is deprecated and will be removed soon. Please use `_basic_v2_derivative_order ` instead
3023+ This method is deprecated and will be removed soon. Please use `_basic_derivative_order_v2 ` instead
30333024 """
3034- warn ("This method is deprecated. Use _basic_v2_derivative_order instead" , DeprecationWarning , stacklevel = 2 )
3025+ warn ("This method is deprecated. Use _basic_derivative_order_v2 instead" , DeprecationWarning , stacklevel = 2 )
30353026
30363027 formatted_quantity = f"{ chain_quantity .normalize ():f} "
30373028 formatted_price = f"{ chain_price .normalize ():f} "
0 commit comments