@@ -6428,16 +6428,14 @@ export class DriftClient {
64286428 } ,
64296429 precedingIxs : TransactionInstruction [ ] = [ ] ,
64306430 overrideCustomIxIndex ?: number ,
6431- includeHighLeverageModeConfig ?: boolean ,
64326431 txParams ?: TxParams
64336432 ) : Promise < TransactionSignature > {
64346433 const ixs = await this . getPlaceSignedMsgTakerPerpOrderIxs (
64356434 signedSignedMsgOrderParams ,
64366435 marketIndex ,
64376436 takerInfo ,
64386437 precedingIxs ,
6439- overrideCustomIxIndex ,
6440- includeHighLeverageModeConfig
6438+ overrideCustomIxIndex
64416439 ) ;
64426440 const { txSig } = await this . sendTransaction (
64436441 await this . buildTransaction ( ixs , txParams ) ,
@@ -6457,16 +6455,22 @@ export class DriftClient {
64576455 signingAuthority : PublicKey ;
64586456 } ,
64596457 precedingIxs : TransactionInstruction [ ] = [ ] ,
6460- overrideCustomIxIndex ?: number ,
6461- includeHighLeverageModeConfig ?: boolean
6458+ overrideCustomIxIndex ?: number
64626459 ) : Promise < TransactionInstruction [ ] > {
64636460 const remainingAccounts = this . getRemainingAccounts ( {
64646461 userAccounts : [ takerInfo . takerUserAccount ] ,
64656462 useMarketLastSlotCache : false ,
64666463 readablePerpMarketIndex : marketIndex ,
64676464 } ) ;
64686465
6469- if ( includeHighLeverageModeConfig ) {
6466+ const isDelegateSigner = takerInfo . signingAuthority . equals (
6467+ takerInfo . takerUserAccount . delegate
6468+ ) ;
6469+ const { signedMsgOrderParams } = this . decodeSignedMsgOrderParamsMessage (
6470+ signedSignedMsgOrderParams . orderParams ,
6471+ isDelegateSigner
6472+ ) ;
6473+ if ( isUpdateHighLeverageMode ( signedMsgOrderParams . bitFlags ) ) {
64706474 remainingAccounts . push ( {
64716475 pubkey : getHighLeverageModeConfigPublicKey ( this . program . programId ) ,
64726476 isWritable : true ,
@@ -6493,9 +6497,6 @@ export class DriftClient {
64936497 0
64946498 ) ;
64956499
6496- const isDelegateSigner = takerInfo . signingAuthority . equals (
6497- takerInfo . takerUserAccount . delegate
6498- ) ;
64996500 const placeTakerSignedMsgPerpOrderIx =
65006501 this . program . instruction . placeSignedMsgTakerOrder (
65016502 signedMsgIxData ,
0 commit comments