-
Notifications
You must be signed in to change notification settings - Fork 109
Use sat/msat arguments of ln addinvoice
#1075
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
Use sat/msat arguments of ln addinvoice
#1075
Conversation
cmd/litcli/ln.go
Outdated
| "exclusive to msat_amount", | ||
| }, | ||
| cli.Uint64Flag{ | ||
| Name: "msat_amount", |
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 you look at litcli ln addinvoice, you see that we already have all flags from commands.AddInvoiceCommand.Flags:
--amt value the amt of satoshis in this invoice (default: 0)
--amt_msat value the amt of millisatoshis in this invoice (default: 0)
So we should use those.
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.
Thanks!
Also wondering why we do field related checks on the cmd level, as they are also checked in tapd/lnd
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.
Ok realized the RPCs don't always return user-friendly errors, so made the checks in cmd too (much better to get a single text message back saying must only set X or Y)
996a024 to
ebd84bc
Compare
msat_amount flag to ln addinvoiceln addinvoice
5e9819e to
d29c669
Compare
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.
tACK. While testing I found out that --amt doesn't work, only --amt_msat. But that needs to be fixed in tapd, which I'm going to do now.
|
Needs a rebase to get the itests running. |
Ah! great catch, I believe I only tried |
d29c669 to
78c2490
Compare
|
LOL, apparently if you use the "fixes" keyword and then link to another PR, that one is closed... Sorry, my bad. |
Description
Uses the existing LND arguments for sat/msat amount for the
litcli ln addinvoicecommand. This new argument exposes the behavior introduced in lightninglabs/taproot-assets#1448Closes #1073