Skip to content

Commit

Permalink
Add receiverIdentifier param to CreateUmaInvoice interface (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyav authored Jul 18, 2024
1 parent 79965e4 commit 45bc629
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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

0 comments on commit 45bc629

Please sign in to comment.