Skip to content

Conversation

crispheaney
Copy link
Member

No description provided.

@crispheaney crispheaney changed the base branch from master to crispheaney/isolated-position October 6, 2025 08:29
.get_isolated_token_amount(&spot_market)?;

// i64::MIN is used to transfer the entire isolated position deposit
let amount = if amount == i64::MIN {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@crispheaney for my understanding on the client-side, does this mean we would pass in like -9223372036854775808? For the instruction?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can do this from ui yes but not required for settle pnl ix since program does it automatically


pub fn can_transfer_isolated_position_deposit(&self) -> bool {
!self.is_open_position()
&& !self.has_open_order()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this mean if user wanted to transfer but had an open order we would probably want to cancel that or show them an error saying you can't transfer because of this open order?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants