-
Notifications
You must be signed in to change notification settings - Fork 3
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
Implement prepare_refund_failed_swap()
#712
Conversation
6ce5633
to
89d313b
Compare
prepare_refund_failed_swap()
e266e70
to
8743455
Compare
89d313b
to
504b4d4
Compare
c547c56
to
fe6ca62
Compare
src/lipalightninglib.udl
Outdated
@@ -85,6 +85,9 @@ interface LightningNode { | |||
[Throws=LnError] | |||
sequence<FailedSwapInfo> get_unresolved_failed_swaps(); | |||
|
|||
[Throws=LnError] | |||
FailedSwapRefundInfo prepare_refund_failed_swap(FailedSwapInfo failed_swap_info, string to_address, u32 onchain_fee_rate); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might make sense to expand the FailedSwapRefundInfo
to be used as an argument in the resolve_failed_swap
method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we don't need to force the use of the prepare method. Why do we need more info other than the swap address?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just thinking from the client perspective, but I might have misunderstood the use of the prepare_refund_failed_swap method.
As a client if, and here I'm not sure if that's the case, I always call the prepare_refund_failed_swap method before refunding a swap would prefer to just supply the response from this to the refund_failed_swap method.
But if the client doesn't always call the prepare method before, this doesn't make sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. It definitely wasn't strictly needed that the prepare method is used, but we expect it to always be used, so let's do it like you propose. Implemented in 784bea6
b7788fc
to
42952a4
Compare
Co-authored-by: Dominic <dominic@getlipa.com>
No description provided.