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

events: record EventPositionClose when closing positions manually #4779

Merged
merged 1 commit into from
Jul 31, 2024

Conversation

cronokirby
Copy link
Contributor

There are currently two ways for a position to get closed:

  1. automatically by the DEX, for an auto-close position,
  2. at the end of the block, after being queued for closure in the in the action handler.

For 2., we weren't emitting the event.
This commit changes things so that we do, in fact, emit the event in this case, for a position that has not yet been closed.

Checklist before requesting a review

  • If this code contains consensus-breaking changes, I have added the "consensus-breaking" label. Otherwise, I declare my belief that there are not consensus-breaking changes, for the following reason:

    Only adds new events.

There are currently two ways for a position to get closed:

  1. automatically by the DEX, for an auto-close position,
  2. at the end of the block, after being *queued* for closure in the in
     the action handler.

For 2., we weren't emitting the event.
This commit changes things so that we do, in fact, emit the event
in this case, for a position that has not yet been closed.
@cronokirby cronokirby merged commit 6981aec into main Jul 31, 2024
13 checks passed
@cronokirby cronokirby deleted the event-position-close branch July 31, 2024 04:18
@conorsch conorsch mentioned this pull request Aug 28, 2024
3 tasks
conorsch pushed a commit that referenced this pull request Aug 28, 2024
…4779)

There are currently two ways for a position to get closed:

  1. automatically by the DEX, for an auto-close position,
2. at the end of the block, after being *queued* for closure in the in
the action handler.

For 2., we weren't emitting the event.
This commit changes things so that we do, in fact, emit the event in
this case, for a position that has not yet been closed.

## Checklist before requesting a review

- [x] If this code contains consensus-breaking changes, I have added the
"consensus-breaking" label. Otherwise, I declare my belief that there
are not consensus-breaking changes, for the following reason:

  > Only adds new events.

(cherry picked from commit 6981aec)
conorsch pushed a commit that referenced this pull request Aug 29, 2024
…4779)

There are currently two ways for a position to get closed:

  1. automatically by the DEX, for an auto-close position,
2. at the end of the block, after being *queued* for closure in the in
the action handler.

For 2., we weren't emitting the event.
This commit changes things so that we do, in fact, emit the event in
this case, for a position that has not yet been closed.

## Checklist before requesting a review

- [x] If this code contains consensus-breaking changes, I have added the
"consensus-breaking" label. Otherwise, I declare my belief that there
are not consensus-breaking changes, for the following reason:

  > Only adds new events.

(cherry picked from commit 6981aec)
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