Skip to content

Commit

Permalink
Updated code to reflect RFQ spec changes
Browse files Browse the repository at this point in the history
  • Loading branch information
thehenrytsai committed Jul 18, 2024
1 parent 590e502 commit 11305d1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions packages/http-server/src/http-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ type CallbackMap = {

/**
* Options for creating a new HttpServer
* @param opts.offeringsApi Optionally accepts an {@link OfferingsApi}. Defaults to {@link InMemoryOfferingsApi}.
* @param opts.exchangesApi Optionally accepts an {@link ExchangesApi}. Defaults to {@link InMemoryExchangesApi}.
* @param opts.balancesApi Optionally accepts a {@link BalancesApi}. Example: {@link InMemoryBalancesApi}. Else, leave `undefined` if not supporting the balances endpoint.
* @param opts.offeringsApi Optionally accepts an {@link OfferingsApi}. Defaults an in-memory implementation.
* @param opts.exchangesApi Optionally accepts an {@link ExchangesApi}. Defaults an in-memory implementation.
* @param opts.balancesApi Optionally accepts a {@link BalancesApi}. Else, leave `undefined` if not supporting the balances endpoint.
* @param opts.pfiDid Required if instantiating the HttpServer with options. Else, defaults to an arbitrary string for example purposes only.
* @beta
*/
Expand Down
2 changes: 0 additions & 2 deletions packages/http-server/tests/create-exchange.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ describe('POST /exchanges/:exchangeId/rfq', () => {
data: {
...await DevTools.createRfqData(),
offeringId : offering.metadata.id,
claims : [],
},
})
await rfq.sign(aliceDid)
Expand Down Expand Up @@ -291,7 +290,6 @@ describe('POST /exchanges/:exchangeId/rfq', () => {
data: {
...DevTools.createRfqData(),
offeringId : offering.metadata.id,
claims : [],
payin : {
kind : offering.data.payin.methods[0].kind,
paymentDetails : {
Expand Down
7 changes: 5 additions & 2 deletions packages/protocol/src/message-kinds/rfq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,11 @@ export class Rfq extends Message {
},
payout: {
paymentDetails: payoutDetails,
},
claims: claims
}
}

if (claims !== undefined) {
privateData.claims = claims
}

return {
Expand Down

0 comments on commit 11305d1

Please sign in to comment.