diff --git a/CHANGELOG.md b/CHANGELOG.md index 300ed72f1..f1673adac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - program: add add update_liquidation_margin_buffer_ratio ([#695](https://github.com/drift-labs/protocol-v2/pull/695)) - program: account for fee pool when settling positive pnl ([#687](https://github.com/drift-labs/protocol-v2/pull/687)) - sdk: fix bug which incorrectly calculated leverage after trade for a market with no position but short orders open +- sdk: fix bug in modifying an order that previously had auction params to a non-auction order ### Breaking diff --git a/sdk/src/driftClient.ts b/sdk/src/driftClient.ts index 60a10b685..b3443d47c 100644 --- a/sdk/src/driftClient.ts +++ b/sdk/src/driftClient.ts @@ -4649,12 +4649,12 @@ export class DriftClient { oraclePriceOffset: newOraclePriceOffset || null, triggerPrice: newTriggerPrice || null, triggerCondition: newTriggerCondition || null, - auctionDuration: auctionDuration || null, - auctionStartPrice: auctionStartPrice || null, - auctionEndPrice: auctionEndPrice || null, - reduceOnly: reduceOnly || null, + auctionDuration: auctionDuration || 0, + auctionStartPrice: auctionStartPrice || ZERO, + auctionEndPrice: auctionEndPrice || ZERO, + reduceOnly: reduceOnly || false, postOnly: postOnly || null, - immediateOrCancel: immediateOrCancel || null, + immediateOrCancel: immediateOrCancel || false, policy: policy || null, maxTs: maxTs || null, }; @@ -4767,12 +4767,12 @@ export class DriftClient { oraclePriceOffset: newOraclePriceOffset || null, triggerPrice: newTriggerPrice || null, triggerCondition: newTriggerCondition || null, - auctionDuration: auctionDuration || null, - auctionStartPrice: auctionStartPrice || null, - auctionEndPrice: auctionEndPrice || null, - reduceOnly: reduceOnly || null, + auctionDuration: auctionDuration || 0, + auctionStartPrice: auctionStartPrice || ZERO, + auctionEndPrice: auctionEndPrice || ZERO, + reduceOnly: reduceOnly || false, postOnly: postOnly || null, - immediateOrCancel: immediateOrCancel || null, + immediateOrCancel: immediateOrCancel || false, policy: policy || null, maxTs: maxTs || null, };