Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Conversation

@ghost
Copy link

@ghost ghost commented Sep 17, 2018

Closes: #481

if (
err &&
err.details &&
err.details.includes('try force closing it instead')
Copy link
Author

Choose a reason for hiding this comment

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

We're checking the string contents of the error message here because LND returns a generic/unknown error code.

https://github.com/lightningnetwork/lnd/blob/master/rpcserver.go#L1138
https://github.com/grpc/grpc-go/blob/master/codes/codes.go#L43

@valentinewallace
Copy link
Contributor

@ERKarl I'm going to talk to our designer first, because I'm not sure exactly how this feature is going to look currently. We want to warn the user somehow of the tradeoffs.

@ghost
Copy link
Author

ghost commented Sep 19, 2018

@valentinewallace sounds good. With the current implementation I used the same "close channel" screen.

https://github.com/lightninglabs/lightning-app/pull/687/files#diff-95d6f755680ac8d4f60b8b3b91955aefR33

@valentinewallace
Copy link
Contributor

@ERKarl So it turns out the desired behavior for these screens is as follows:

For this screen:
If cooperative close is not available for whatever reason, say "force close channel" at bottom instead of "close channel".

For this screen:
If the channel is cooperative closing, show the copy shown on the screen.
If the channel needs to be forced closed, change the copy to warn the user how long their funds will be unavailable/potentially other tradeoffs of force closing (I think that's the only one though).

These are pretty significant changes to how this PR currently is, so let me know if you're still interested.

@ghost
Copy link
Author

ghost commented Oct 1, 2018

@valentinewallace thanks for the update.

If I'm not mistaken the channel delete view already works as you described:

  1. User enters the close-channel view and clicks "Close Channel"
  2. If the channel close is unsuccessful a copy of channel-force-delete will be shown, explaining the trade-offs (except CSV delay)

To conclude this PR needs to be updated with:

  1. Change "Close Channel" to "Force Close Channel" if the channel is inactive in this screen
  2. Include CSV delay in the force-close-channel view. Or perhaps we don't need a separate view for this and just change the copy text and make the close channel/force close channel button behaviour dynamic within the channel-delete view?

@tanx
Copy link
Contributor

tanx commented Oct 5, 2018

Closing in favor of #717

@tanx tanx closed this Oct 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants