Rename param to description

This commit is contained in:
ekzyis 2024-12-27 01:21:37 +01:00
parent 143aa67a5d
commit 43a2b4e9d5
2 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@ package lightning
type Bolt11 string type Bolt11 string
type Lightning interface { type Lightning interface {
CreateInvoice(msats int64, comment string) (Bolt11, error) CreateInvoice(msats int64, description string) (Bolt11, error)
} }
type LightningImpl struct { type LightningImpl struct {

View File

@ -53,10 +53,10 @@ func WithPhoenixdWebhookUrl(webhookUrl string) func(*Phoenixd) *Phoenixd {
} }
} }
func (p *Phoenixd) CreateInvoice(msats int64, comment string) (lightning.Bolt11, error) { func (p *Phoenixd) CreateInvoice(msats int64, description string) (lightning.Bolt11, error) {
values := url.Values{} values := url.Values{}
values.Add("amountSat", strconv.FormatInt(msats/1000, 10)) values.Add("amountSat", strconv.FormatInt(msats/1000, 10))
values.Add("description", comment) values.Add("description", description)
if p.webhookUrl != "" { if p.webhookUrl != "" {
values.Add("webhookUrl", p.webhookUrl) values.Add("webhookUrl", p.webhookUrl)
} }