-
Notifications
You must be signed in to change notification settings - Fork 103
cli: add group key support to channel related calls. #1052
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
base: master
Are you sure you want to change the base?
Conversation
Working on it. |
672e373
to
96b3339
Compare
For
. Confused if this comment belongs here or in lightninglabs/taproot-assets#1498 ? |
|
Here we also need to mention group_key |
At https://github.com/lightninglabs/lightning-terminal/pull/1052/files#diff-f9c05a4a36f7d2dcc59718bda9351aeab75a35de48e367bcd08d8cbf1f4be8f7R451 you say |
At https://github.com/lightninglabs/lightning-terminal/pull/1052/files#diff-f9c05a4a36f7d2dcc59718bda9351aeab75a35de48e367bcd08d8cbf1f4be8f7R37 you say |
In https://github.com/lightninglabs/lightning-terminal/pull/1052/files#diff-f9c05a4a36f7d2dcc59718bda9351aeab75a35de48e367bcd08d8cbf1f4be8f7R301-R302 you say |
If all these things can be fixed, I think we can also close lightninglabs/taproot-assets#1183 . |
Will update. As an aside: if you go to the "Files changed" tab in a PR, then you can add comments to a specific line of a PR. And then you can also group multiple such comments into a single review, which makes it easy to see and resolve. Less work for you and also less work for the author. |
96b3339
to
4f688aa
Compare
@ZZiigguurraatt thanks for your feedback! I think I've addressed all your comments in the latest push. |
this did not work for lines out of range from the edits you made |
4f688aa
to
c63c403
Compare
Fixed the compilation issue. |
Okay, what do you think about this comment I made above "If I try |
I didn't see that comment anywhere before... |
cmd/litcli/ln.go
Outdated
@@ -437,17 +453,18 @@ var payInvoiceCommand = cli.Command{ | |||
This command attempts to pay an invoice using an asset channel as the | |||
source of the payment. The asset ID of the channel must be specified | |||
using the --asset_id flag. | |||
|
|||
This command is a shortcut for 'sendpayment --pay_req='. |
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.
If I try sendpayment --pay_req=
instead, I get [litcli] the --keysend flag must be set
.
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.
Yeah, that was an incorrect check. Fixed that.
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.
Okay, that didn't work. See main comment at the bottom.
actually, maybe you don't get them unless I click "submit review"? I thought that meant I was satisfied with changes, but looks like I actually have a few options when I submit. |
Yeah, as long as it says "pending", only you see the comment. |
e3e8b5e
to
9d9d26a
Compare
Okay, so the attempt at making This whole confusion came out of the attempt to re-use a lot of the description and also validation logic from So I did this instead:
I think with that things should be way more clear. I hope you agree with the changes, @ZZiigguurraatt. |
I tested
|
9d9d26a
to
747706f
Compare
Oops, my bad, sorry. Fixed that issue and tested the flow manually as well this time. |
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.
Made some comments throughout. The most important one is this one: #1052 (comment)
The others are all nits.
I tested the itest locally.
} | ||
} | ||
|
||
if len(assetIDBytes) == 0 && len(groupKeyBytes) == 0 { |
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.
Surely this must be
if len(assetIDBytes) == 0 && len(groupKeyBytes) == 0 { | |
if len(assetIDBytes) > 0 && len(groupKeyBytes) > 0 { |
or I'm not understanding the logic here.
To send a multi-asset LN keysend payment, the --asset_id=X or | ||
--group_key=X argument can be used to specify the asset to use. | ||
|
||
Note that this command will only work with the --keysend argument set. |
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.
👍 for the B1-level writing.
} | ||
|
||
assetAmountToSend := cliCtx.Uint64(assetAmountFlag.Name) | ||
if assetAmountToSend == 0 { |
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.
We don't need to check for zero amounts? Or is this offloaded to tapd?
PayReqString: payReq, | ||
}, | ||
) | ||
decodeResp, err := aliceTap.DecodeAssetPayReq(ctx, &tchrpc.AssetPayReq{ |
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.
This doesn't follow our dev guidelines. When wrapping long function calls, all arguments should begin in a new line after the open parenthesis and the close parenthesis should be placed on its own line. This is also true for the alice.AddInvoice
function call above, and the aliceTap.DecodeAssetPayReq
call below.
Depends on lightninglabs/taproot-assets#1498.
Fixes lightninglabs/taproot-assets#1497.
Fixes lightninglabs/taproot-assets#1183.
@ZZiigguurraatt can you help test this PR please?