@@ -568,7 +568,7 @@ def sign_modify_order(
568568
569569 def sign_approve_integrator (
570570 self ,
571- eth_private_key : str ,
571+ eth_private_key : Optional [ str ] ,
572572 integrator_account_index : int ,
573573 max_perps_taker_fee : int ,
574574 max_perps_maker_fee : int ,
@@ -591,6 +591,8 @@ def sign_approve_integrator(
591591 api_key_index ,
592592 self .account_index
593593 )
594+ if eth_private_key is None :
595+ return self .__decode_tx_info (res )
594596 return self .__decode_and_sign_tx_info (eth_private_key , res )
595597
596598 def sign_approve_integrator_same_master_account (
@@ -1200,7 +1202,6 @@ async def modify_order(
12001202 @process_api_key_and_nonce
12011203 async def approve_integrator (
12021204 self ,
1203- eth_private_key : str ,
12041205 integrator_account_index : int ,
12051206 max_perps_taker_fee : int ,
12061207 max_perps_maker_fee : int ,
@@ -1209,7 +1210,8 @@ async def approve_integrator(
12091210 approval_expiry : int ,
12101211 skip_nonce : int = SKIP_NONCE_OFF ,
12111212 nonce : int = DEFAULT_NONCE ,
1212- api_key_index : int = DEFAULT_API_KEY_INDEX
1213+ api_key_index : int = DEFAULT_API_KEY_INDEX ,
1214+ eth_private_key : Optional [str ] = None ,
12131215 ):
12141216 tx_type , tx_info , tx_hash , error = self .sign_approve_integrator (
12151217 eth_private_key ,
@@ -1231,38 +1233,6 @@ async def approve_integrator(
12311233 logging .debug (f"Approve Integrator Send. TxResponse: { api_response } " )
12321234 return tx_info , api_response , None
12331235
1234- @process_api_key_and_nonce
1235- async def approve_integrator_same_master_account (
1236- self ,
1237- integrator_account_index : int ,
1238- max_perps_taker_fee : int ,
1239- max_perps_maker_fee : int ,
1240- max_spot_taker_fee : int ,
1241- max_spot_maker_fee : int ,
1242- approval_expiry : int ,
1243- skip_nonce : int = SKIP_NONCE_OFF ,
1244- nonce : int = DEFAULT_NONCE ,
1245- api_key_index : int = DEFAULT_API_KEY_INDEX
1246- ):
1247- tx_type , tx_info , tx_hash , error = self .sign_approve_integrator_same_master_account (
1248- integrator_account_index ,
1249- max_perps_taker_fee ,
1250- max_perps_maker_fee ,
1251- max_spot_taker_fee ,
1252- max_spot_maker_fee ,
1253- approval_expiry ,
1254- skip_nonce ,
1255- nonce ,
1256- api_key_index
1257- )
1258- if error is not None :
1259- return None , None , error
1260-
1261- logging .debug (f"Approve Integrator TxHash: { tx_hash } TxInfo: { tx_info } " )
1262- api_response = await self .send_tx (tx_type = tx_type , tx_info = tx_info )
1263- logging .debug (f"Approve Integrator Send. TxResponse: { api_response } " )
1264- return tx_info , api_response , None
1265-
12661236 @process_api_key_and_nonce
12671237 async def transfer (self , eth_private_key : str , to_account_index : int , asset_id : int , route_from : int , route_to : int , amount : float , fee : int , memo : str , skip_nonce : int = SKIP_NONCE_OFF , nonce : int = DEFAULT_NONCE , api_key_index : int = DEFAULT_API_KEY_INDEX ):
12681238 if asset_id in self .ASSET_TO_TICKER_SCALE :
0 commit comments