Skip to content

Commit

Permalink
Rename fields based on suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenlu committed Sep 10, 2024
1 parent bf52933 commit 344a7ce
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions uma/protocol/invoice.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ type UmaInvoice struct {
// RequiredPayerData the data about the payer that the sending VASP must provide in order to send a payment.
RequiredPayerData *CounterPartyDataOptions `tlv:"6"`

// UmaVersion is a list of UMA versions that the VASP supports for this transaction. It should be
// UmaVersions is a list of UMA versions that the VASP supports for this transaction. It should be
// containing the lowest minor version of each major version it supported, separated by commas.
UmaVersion string `tlv:"7"`
UmaVersions string `tlv:"7"`

// CommentCharsAllowed is the number of characters that the sender can include in the comment field of the pay request.
CommentCharsAllowed *int `tlv:"8"`
Expand All @@ -63,7 +63,7 @@ type UmaInvoice struct {
SenderUma *string `tlv:"9"`

// The maximum number of the invoice can be paid
InvoiceLimit *uint64 `tlv:"10"`
MaxNumPayments *uint64 `tlv:"10"`

// KYC status of the receiver, default is verified.
KycStatus *KycStatus `tlv:"11"`
Expand Down
4 changes: 2 additions & 2 deletions uma/test/protocol_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,10 @@ func TestUMAInvoiceTLVAndBech32(t *testing.T) {
"email": umaprotocol.CounterPartyDataOption{Mandatory: false},
"compliance": umaprotocol.CounterPartyDataOption{Mandatory: true},
},
UmaVersion: "0.3",
UmaVersions: "0.3",
CommentCharsAllowed: nil,
SenderUma: nil,
InvoiceLimit: nil,
MaxNumPayments: nil,
KycStatus: &kyc,
Callback: "https://example.com/callback",
Signature: &signature,
Expand Down
4 changes: 2 additions & 2 deletions uma/uma.go
Original file line number Diff line number Diff line change
Expand Up @@ -1142,10 +1142,10 @@ func CreateUmaInvoice(
// TODO: modify the version once ready, all current version cannot support UMA invoice.
// Since this only add fields and features to the protocol, this won't break the current
// UMA version so it can be a minor version bump.
UmaVersion: UmaProtocolVersion,
UmaVersions: UmaProtocolVersion,
CommentCharsAllowed: commentCharsAllowed,
SenderUma: senderUma,
InvoiceLimit: invoiceLimit,
MaxNumPayments: invoiceLimit,
KycStatus: receiverKycStatus,
Callback: callback,
Signature: nil,
Expand Down

0 comments on commit 344a7ce

Please sign in to comment.