Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sdk: fix modify order bug #700

Merged
merged 2 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
20 changes: 10 additions & 10 deletions sdk/src/driftClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down Expand Up @@ -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,
};
Expand Down
Loading