-
Notifications
You must be signed in to change notification settings - Fork 116
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
program: new modify order ix #422
Conversation
let post_only = modify_order_params | ||
.post_only | ||
.unwrap_or(if existing_order.post_only { | ||
PostOnlyParam::MustPostOnly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good to have stricter assumption here 👍
} else { | ||
PostOnlyParam::None | ||
}); | ||
let immediate_or_cancel = modify_order_params |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
technically, params.immediate_or_cancel should not be allowed here, right? looking at handle_place_perp_order
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah it should only be false
let user_order_id = existing_order.user_order_id; | ||
let base_asset_amount = modify_order_params | ||
.base_asset_amount | ||
.unwrap_or(existing_order.base_asset_amount); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this enforce that a partially filled order (base_asset_amount_filled!=0) must have the base asset amount replaced?
might be nice not to and havent thought it completely thru, but just wondering if this is going to lead to confusing states (quoteAssetAmountFilled
estimating prices etc)
No description provided.