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

feat: Add collab close dlc protocol event #2513

Merged
merged 9 commits into from
May 9, 2024

Conversation

holzeis
Copy link
Contributor

@holzeis holzeis commented May 8, 2024

  • Adds the collab close dlc protocol to the dlc_protocols table. Works for the app or the coordinator proposing the collab close.
 515 | open-channel  |                                      | 943f1917-2abd-46ca-bd1b-542753047d00 | Success        | 2024-05-08 13:29:39.938662+00
 516 | settle        | 943f1917-2abd-46ca-bd1b-542753047d00 | 4aacf295-86ad-4d5d-aa7f-5503359befbd | Success        | 2024-05-08 13:30:12.30087+00
 517 | close         | 4aacf295-86ad-4d5d-aa7f-5503359befbd | 1a4d92e0-4e30-4ddf-bcbb-6b72f0123bbc | Success        | 2024-05-08 13:30:18.817366+00
 518 | open-channel  |                                      | 89b29e59-962f-4f18-8365-1a8dc92d4939 | Success        | 2024-05-08 13:44:13.744458+00
 519 | settle        | 89b29e59-962f-4f18-8365-1a8dc92d4939 | b049d38c-9153-4766-ab06-0d2d4308490a | Success        | 2024-05-08 13:44:37.943277+00
 520 | close         | b049d38c-9153-4766-ab06-0d2d4308490a | a5f234d6-b81b-4463-99cf-7a3ffa71623c | Success        | 2024-05-08 13:45:43.26202+00
 521 | open-channel  |                                      | 67c364ce-c568-4991-ad90-59176e2288ff | Success        | 2024-05-08 13:46:47.248595+00
 522 | settle        | 67c364ce-c568-4991-ad90-59176e2288ff | 841751d0-89c7-47cd-b844-cd9efc8af790 | Success        | 2024-05-08 13:47:06.033572+00
 523 | close         | 841751d0-89c7-47cd-b844-cd9efc8af790 | 030256e8-bc1f-429d-8c88-13f42c28de69 | Success        | 2024-05-08 13:47:43.903394+00
  • Shows a status dialog when the channel gets closed and refreshes the wallet so that the incoming transaction will be shown immediately.
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-05-08.at.15.47.54.mp4
  • 0b5542b fixes the issue where we randomly see dialogs appearing.

fixes #2506
fixes #2469

@holzeis holzeis requested review from bonomat and luckysori May 8, 2024 13:51
@holzeis holzeis self-assigned this May 8, 2024
crates/xxi-node/src/node/mod.rs Outdated Show resolved Hide resolved
crates/xxi-node/src/node/dlc_channel.rs Outdated Show resolved Hide resolved
coordinator/src/node.rs Show resolved Hide resolved
coordinator/src/dlc_protocol.rs Outdated Show resolved Hide resolved
coordinator/src/node/channel.rs Outdated Show resolved Hide resolved
coordinator/src/node/channel.rs Outdated Show resolved Hide resolved
coordinator/src/node/channel.rs Outdated Show resolved Hide resolved
coordinator/src/node/channel.rs Show resolved Hide resolved
mobile/native/src/api.rs Show resolved Hide resolved
Copy link
Contributor

@luckysori luckysori left a comment

Choose a reason for hiding this comment

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

No big concerns after discussing.

holzeis added 4 commits May 9, 2024 13:27
Before we were reusing the same reference id of the channel.
Closing a dlc channel is unrelated to any contract, hence the contract id can't be mandatory.
holzeis added 5 commits May 9, 2024 14:04
It can happen that the dialog is not able to render before the next event is received. Before that patch that could have lead to some random dangling events that get shown once the root screen gets rebuild.

This patch puts new events in a last in last out order and on rendering the task dialog pops all events from the queue. This way we prevent having dangling events.

fixes #2506
@holzeis holzeis force-pushed the feat/add-collab-close-channel-to-dlc-protocol-table branch from cd8f9cd to a39a6b1 Compare May 9, 2024 12:04
@holzeis holzeis enabled auto-merge May 9, 2024 12:04
@holzeis holzeis added this pull request to the merge queue May 9, 2024
Merged via the queue into main with commit d42a8c9 May 9, 2024
22 checks passed
@holzeis holzeis deleted the feat/add-collab-close-channel-to-dlc-protocol-table branch May 9, 2024 12:40
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.

Pending dialog opens when navigating to settings Add collab close channel to dlc protocol table
2 participants