Skip to content

Commit ba8ad84

Browse files
authored
program: apply reduce only logic for post only orders (#1878)
* program: apply reduce only logic for post only orders * CHANGELOG
1 parent 2151268 commit ba8ad84

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Features
1111

12+
- program: post only respects reduce only ([#1878](https://github.com/drift-labs/protocol-v2/pull/1878))
1213
- program: add sequence id to exchange/mm oracle ([#1834](https://github.com/drift-labs/protocol-v2/pull/1834))
1314
- program: perp position max margin ratio ([#1847](https://github.com/drift-labs/protocol-v2/pull/1847))
1415
- program: rm lp ([#1755](https://github.com/drift-labs/protocol-v2/pull/1755))

programs/drift/src/state/user.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1408,7 +1408,7 @@ impl Order {
14081408
};
14091409

14101410
// if order is post only, can disregard reduce only
1411-
if !self.reduce_only || self.post_only {
1411+
if !self.reduce_only {
14121412
return Ok(base_asset_amount_unfilled);
14131413
}
14141414

0 commit comments

Comments
 (0)