Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expose new field for remaining quantity in OrderV2 type (#1086) #1087

Merged
merged 1 commit into from
Jul 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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