fix: check description first when creating invoice with phoenixd (#1540)

Modified MakeInvoice in phoenixd.go to check description first (instead of descriptionHash)
This commit is contained in:
thebullishbitcoiner 2025-07-29 03:52:08 -05:00 committed by GitHub
parent d66b355d73
commit 5d11b30de5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -283,10 +283,10 @@ func (svc *PhoenixService) MakeInvoice(ctx context.Context, amount int64, descri
form := url.Values{}
amountSat := strconv.FormatInt(amount/1000, 10)
form.Add("amountSat", amountSat)
if descriptionHash != "" {
form.Add("descriptionHash", descriptionHash)
} else if description != "" {
if description != "" {
form.Add("description", description)
} else if descriptionHash != "" {
form.Add("descriptionHash", descriptionHash)
} else {
form.Add("description", "invoice")
}