Skip to content

Commit 6b7a80a

Browse files
authored
sdk: tweak math for filling triggers (#1880)
* sdk: tweak math for filling triggers * add back line
1 parent 065b633 commit 6b7a80a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

sdk/src/math/auction.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ export function isFallbackAvailableLiquiditySource(
2626
return true;
2727
}
2828

29+
if ((order.bitFlags & OrderBitFlag.SafeTriggerOrder) !== 0) {
30+
return true;
31+
}
32+
2933
return new BN(slot).sub(order.slot).gt(new BN(minAuctionDuration));
3034
}
3135

sdk/src/math/orders.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ export function isFillableByVAMM(
245245
market,
246246
mmOraclePriceData,
247247
slot
248-
).gte(market.amm.minOrderSize)) ||
248+
).gt(ZERO)) ||
249249
isOrderExpired(order, ts)
250250
);
251251
}

0 commit comments

Comments
 (0)