Skip to content
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

Add receiverIdentifier param to CreateUmaInvoice interface #42

Merged
merged 1 commit into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion uma/test/uma_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ func TestMsatsPayReqCreationAndParsing(t *testing.T) {

type FakeInvoiceCreator struct{}

func (f *FakeInvoiceCreator) CreateInvoice(int64, string) (*string, error) {
func (f *FakeInvoiceCreator) CreateInvoice(int64, string, *string) (*string, error) {
encodedInvoice := "lnbcrt100n1p0z9j"
return &encodedInvoice, nil
}
Expand Down
4 changes: 2 additions & 2 deletions uma/uma.go
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ func ParsePayRequest(bytes []byte) (*protocol.PayRequest, error) {
}

type InvoiceCreator interface {
CreateInvoice(amountMsats int64, metadata string) (*string, error)
CreateInvoice(amountMsats int64, metadata string, receiverIdentifier *string) (*string, error)
}

func addInvoiceUUIDToMetadata(metadata string, invoiceUUID string) (string, error) {
Expand Down Expand Up @@ -827,7 +827,7 @@ func GetPayReqResponse(
return nil, err
}
}
encodedInvoice, err := invoiceCreator.CreateInvoice(msatsAmount, metadata+payerDataStr)
encodedInvoice, err := invoiceCreator.CreateInvoice(msatsAmount, metadata+payerDataStr, payeeIdentifier)
if err != nil {
return nil, err
}
Expand Down
Loading