Skip to content

Commit

Permalink
feat: Rename field PaymentRequestMessage.RecipientDID to userDID
Browse files Browse the repository at this point in the history
  • Loading branch information
x1m3 committed Dec 18, 2024
1 parent 97ea05d commit 9f63af5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions api/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2496,7 +2496,7 @@ components:
required:
- id
- issuerDID
- recipientDID
- userDID
- paymentOptionID
- payments
- createdAt
Expand All @@ -2506,7 +2506,7 @@ components:
format: uuid
issuerDID:
type: string
recipientDID:
userDID:
type: string
paymentOptionID:
type: string
Expand Down
2 changes: 1 addition & 1 deletion internal/api/api.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions internal/api/payment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ func TestServer_CreatePaymentRequest(t *testing.T) {
Data: protocol.PaymentRequestInfoData{},
},
},
RecipientDID: receiverDID.String(),
UserDID: receiverDID.String(),
},
},
},
Expand All @@ -658,7 +658,7 @@ func TestServer_CreatePaymentRequest(t *testing.T) {
require.NoError(t, json.Unmarshal(rr.Body.Bytes(), &response))
assert.NotEqual(t, uuid.Nil, response.Id)
assert.Equal(t, tc.expected.resp.IssuerDID, response.IssuerDID)
assert.Equal(t, tc.expected.resp.RecipientDID, response.RecipientDID)
assert.Equal(t, tc.expected.resp.UserDID, response.UserDID)
assert.InDelta(t, time.Now().UnixMilli(), response.CreatedAt.UnixMilli(), 100)
/*
assert.Equal(t, len(tc.expected.resp.Payments), len(response.Payments))
Expand Down
2 changes: 1 addition & 1 deletion internal/api/responses.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ func toCreatePaymentRequestResponse(payReq *domain.PaymentRequest) CreatePayment
CreatedAt: payReq.CreatedAt,
Id: payReq.ID,
IssuerDID: payReq.IssuerDID.String(),
RecipientDID: payReq.RecipientDID.String(),
UserDID: payReq.RecipientDID.String(),
PaymentOptionID: payReq.PaymentOptionID,
Payments: []PaymentRequestInfo{payment},
}
Expand Down

0 comments on commit 9f63af5

Please sign in to comment.