Skip to content

Commit

Permalink
Merge branch 'main' into DX-2465/rename-x-packages
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeSchwert authored Jan 15, 2024
2 parents b70dae5 + d79993d commit 5b849f6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ import type { Fee } from './Fee';

export type FulfillmentDataRequest = {
order_id: string;
/**
* Address of the intended account fulfilling the order
*/
taker_address?: string;
fees: Array<Fee>;
};

5 changes: 4 additions & 1 deletion packages/orderbook/src/orderbook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ export class Orderbook {
* transaction exists it must be signed and submitted to the chain before the fulfilment
* transaction can be submitted or it will be reverted.
* @param {string} listingId - The listingId to fulfil.
* @param {string} fulfillerAddress - The address of the account fulfilling the order.
* @param {string} takerAddress - The address of the account fulfilling the order.
* @param {FeeValue[]} takerFees - Taker ecosystem fees to be paid.
* @return {FulfillOrderResponse} Approval and fulfilment transactions.
*/
async fulfillOrder(
Expand All @@ -208,6 +209,7 @@ export class Orderbook {
const fulfillmentDataRes = await this.apiClient.fulfillmentData([
{
order_id: listingId,
taker_address: takerAddress,
fees: takerFees.map((fee) => ({
amount: fee.amount,
type:
Expand Down Expand Up @@ -244,6 +246,7 @@ export class Orderbook {
const fulfillmentDataRes = await this.apiClient.fulfillmentData(
listings.map((listingRequest) => ({
order_id: listingRequest.listingId,
taker_address: takerAddress,
fees: listingRequest.takerFees.map((fee) => ({
amount: fee.amount,
type:
Expand Down

0 comments on commit 5b849f6

Please sign in to comment.