File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ import {
3131 convertToNumber ,
3232 BASE_PRECISION ,
3333 SignedMsgOrderParamsDelegateMessage ,
34+ OrderParamsBitFlag ,
3435} from '@drift-labs/sdk' ;
3536import { Connection , PublicKey } from '@solana/web3.js' ;
3637import dotenv from 'dotenv' ;
@@ -282,7 +283,10 @@ class DLOBBuilder {
282283 auctionDuration : signedMsgOrderParams . auctionDuration ,
283284 auctionStartPrice : signedMsgOrderParams . auctionStartPrice ,
284285 auctionEndPrice : signedMsgOrderParams . auctionEndPrice ,
285- immediateOrCancel : signedMsgOrderParams . immediateOrCancel ?? false ,
286+ immediateOrCancel :
287+ ( signedMsgOrderParams . bitFlags &
288+ OrderParamsBitFlag . ImmediateOrCancel ) !==
289+ 0 ,
286290 direction : signedMsgOrderParams . direction ,
287291 postOnly : false ,
288292 oraclePriceOffset : signedMsgOrderParams . oraclePriceOffset ?? 0 ,
Original file line number Diff line number Diff line change @@ -241,7 +241,7 @@ export class SwiftMaker {
241241 ? signedMsgOrderParams . auctionStartPrice ! . muln ( 99 ) . divn ( 100 )
242242 : signedMsgOrderParams . auctionEndPrice ! . muln ( 101 ) . divn ( 100 ) ,
243243 postOnly : PostOnlyParams . MUST_POST_ONLY ,
244- immediateOrCancel : true ,
244+ bitFlags : signedMsgOrderParams . bitFlags ,
245245 } ) ,
246246 undefined ,
247247 undefined ,
Original file line number Diff line number Diff line change @@ -263,7 +263,7 @@ export class SwiftPlacer {
263263 auctionDuration : signedMsgOrderParams . auctionDuration ! ,
264264 auctionStartPrice : signedMsgOrderParams . auctionStartPrice ! ,
265265 auctionEndPrice : signedMsgOrderParams . auctionEndPrice ! ,
266- immediateOrCancel : signedMsgOrderParams . immediateOrCancel ?? false ,
266+ immediateOrCancel : false ,
267267 direction : signedMsgOrderParams . direction ,
268268 postOnly : false ,
269269 oraclePriceOffset : signedMsgOrderParams . oraclePriceOffset ?? 0 ,
@@ -280,7 +280,7 @@ export class SwiftPlacer {
280280 baseAssetAmountFilled : ZERO ,
281281 quoteAssetAmountFilled : ZERO ,
282282 quoteAssetAmount : ZERO ,
283- bitFlags : 0 ,
283+ bitFlags : signedMsgOrderParams . bitFlags ,
284284 postedSlotTail : 0 ,
285285 } ;
286286
You can’t perform that action at this time.
0 commit comments