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: Only accept a rollover offer if the contract has been confirmed. #2633

Conversation

holzeis
Copy link
Contributor

@holzeis holzeis commented Jun 17, 2024

Syncs the wallet eagerly if the channel is not yet confirmed.

If the contract is not confirmed, the rollover offer gets rejected. This fixes an issue where the app otherwise risk ending up in an intermediate state as it can't accept the RenewConfirm message.

fixes #2630

holzeis added 3 commits June 17, 2024 16:38
Analogue to what we do when opening a position. We check if the contract is confirmed. If not, we sync eagerly - thus increasing the chances that the rollover proposal will succeed.

This covers a small edge case where the user opened a position right before the rollover window and the coordinator hasn't synced yet.
Syncs the wallet eagerly if the channel is not yet confirmed.

If the contract is not confirmed, the rollover offer gets rejected. This fixes an issue where the app otherwise risk ending up in an intermediate state as it can't accept the `RenewConfirm` message.

see #2630
@holzeis holzeis requested review from bonomat and luckysori June 17, 2024 14:43
@holzeis holzeis self-assigned this Jun 17, 2024
@holzeis holzeis marked this pull request as draft June 17, 2024 14:43
@holzeis
Copy link
Contributor Author

holzeis commented Jun 17, 2024

@luckysori Any idea why 9635806 doesn't fix the issue?

Even though I pass the check if confirmed contract check when processing the RolloverOffer processing the RolloverConfirm message still fails on an invalid state error.

Failed to handle RolloverConfirm message from 02dd6abec97f9a748bf76ad502b004ce05d1b2d1f43a9e76bd7d85e767ffb022c9: Invalid state: Invalid state Contract { state: "signed" } expected Confirmed.

@github-actions github-actions bot added the Stale label Jul 18, 2024
@github-actions github-actions bot closed this Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed rollover if the wallet hasn't synced yet
1 participant