multi: add IsBlinded to lnrpc.Invoice for nicer UX
The BlindedPathConfig struct is nice for invoice creation but when we use the Invoice message for viewing an invoice, it would be nicer to see an "is_blinded" field.
This commit is contained in:
9 files changed
+1226
-1175
No files matched your search
@@ -489,6 +489,15 @@ func (i *Invoice) IsAMP() bool {
|
||||
)
|
||||
}
|
||||
|
||||
// IsBlinded returns true if the invoice contains blinded paths.
|
||||
func (i *Invoice) IsBlinded() bool {
|
||||
if i.Terms.Features == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
return i.Terms.Features.IsSet(lnwire.Bolt11BlindedPathsRequired)
|
||||
}
|
||||
|
||||
// HtlcState defines the states an htlc paying to an invoice can be in.
|
||||
type HtlcState uint8
|
||||
|
||||
|
||||
Reference in new issue
Block a user