Skip to content

Commit

Permalink
expose new field for remaining quantity in OrderV2 type (#1086) (#1087)
Browse files Browse the repository at this point in the history
Co-authored-by: Kevin Zhang <kevinzhanghk2012@gmail.com>
  • Loading branch information
thenerdassassin and UTkzhang committed Jul 12, 2023
1 parent 3e621a2 commit dd31cf1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "opensea-js",
"version": "6.1.2",
"version": "6.1.3",
"description": "JavaScript SDK for the OpenSea marketplace helps developers build new experiences using NFTs and our marketplace data!",
"license": "MIT",
"author": "OpenSea Developers",
Expand Down
2 changes: 2 additions & 0 deletions src/orders/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export type OrderV2 = {
clientSignature: string | null;
makerAssetBundle: OpenSeaAssetBundle;
takerAssetBundle: OpenSeaAssetBundle;
remainingQuantity: number;
};

export type FulfillmentDataResponse = {
Expand Down Expand Up @@ -116,6 +117,7 @@ export type SerializedOrderV2 = {
client_signature: string | null;
maker_asset_bundle: unknown;
taker_asset_bundle: unknown;
remaining_quantity: number;
};

export type QueryCursors = {
Expand Down
1 change: 1 addition & 0 deletions src/orders/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,5 +182,6 @@ export const deserializeOrder = (order: SerializedOrderV2): OrderV2 => {
clientSignature: order.client_signature,
makerAssetBundle: assetBundleFromJSON(order.maker_asset_bundle),
takerAssetBundle: assetBundleFromJSON(order.taker_asset_bundle),
remainingQuantity: order.remaining_quantity,
};
};
1 change: 1 addition & 0 deletions test/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const expectValidOrder = (order: OrderV2) => {
"markedInvalid",
"makerAssetBundle",
"takerAssetBundle",
"remainingQuantity",
];
for (const field of requiredFields) {
expect(field in order).to.be.true;
Expand Down

0 comments on commit dd31cf1

Please sign in to comment.