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

fix: Ignore missing order id when rejecting a rollover offer #2557

Merged
merged 2 commits into from
May 23, 2024

Conversation

holzeis
Copy link
Contributor

@holzeis holzeis commented May 21, 2024

In case of a rollover we do not have an order id or and order in filling. As a result this logic failed when trying to reject a rollover offer.

The solution is still hacky as with the correct context information we shouldn't even try to set the order to failed, but that context is missing when we are reconnecting in the on_connect function and finding a dlc channel in state RenewOffered.

fixes #2554

@holzeis holzeis requested review from bonomat and luckysori May 21, 2024 13:12
@holzeis holzeis self-assigned this May 21, 2024
mobile/native/src/trade/order/handler.rs Outdated Show resolved Hide resolved
coordinator/src/node.rs Show resolved Hide resolved
coordinator/src/node.rs Show resolved Hide resolved
@bonomat
Copy link
Contributor

bonomat commented May 22, 2024

I'm not sure I understand this fix.

holzeis added 2 commits May 23, 2024 20:11
In case of a rollover we do not have an order id or and order in filling. As a result this logic failed when trying to reject a rollover offer.

The solution is still hacky as with the correct context information we shouldn't even try to set the order to failed, but that context is missing when we are reconnecting in the `on_connect` function and finding a dlc channel in state `RenewOffered`.
Otherwise the position is stuck in `Rollover` and won't get recovered.
@holzeis holzeis force-pushed the fix/handle-pending-rollover-offer branch from c6b5237 to ffd6b56 Compare May 23, 2024 18:11
@holzeis holzeis enabled auto-merge May 23, 2024 18:12
@holzeis holzeis added this pull request to the merge queue May 23, 2024
Merged via the queue into main with commit 9a39e25 May 23, 2024
22 checks passed
@holzeis holzeis deleted the fix/handle-pending-rollover-offer branch May 23, 2024 18:56
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.

Rejecting a RolloverOffer fails due to missing order_id
2 participants