mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-29 07:00:55 +02:00
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:
@@ -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