Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Commit

Permalink
Merge pull request #2242 from 0xProject/fix-mesh-orderbook-types
Browse files Browse the repository at this point in the history
HACK: Types as any until Mesh RPC client is published
  • Loading branch information
dekz authored Oct 4, 2019
2 parents 086c308 + d4729e2 commit ccf40fd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
},
{
"path": "packages/instant/umd/instant.js",
"maxSize": "1460kB"
"maxSize": "1960kB"
}
],
"ci": {
Expand Down
2 changes: 1 addition & 1 deletion packages/instant/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"description": "0x Instant React Component",
"main": "umd/instant.js",
"scripts": {
"build": "webpack --mode production",
"build": "NODE_ENV=production node --max_old_space_size=8192 ../../node_modules/.bin/webpack --mode production",
"build:dev": "webpack --mode development",
"build:ci": "yarn build",
"dev": "dotenv webpack-dev-server -- --mode development",
Expand Down
9 changes: 6 additions & 3 deletions packages/orderbook/src/order_provider/mesh_order_provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ export class MeshOrderProvider extends BaseOrderProvider {
const remainingFillableTakerAssetAmount = (orderEvent as OrderEvent).fillableTakerAssetAmount
? (orderEvent as OrderEvent).fillableTakerAssetAmount
: new BigNumber(0);
// TODO(dekz): Remove the any hack when mesh is published v3
return {
order: orderEvent.signedOrder,
// tslint:disable:no-unnecessary-type-assertion
order: orderEvent.signedOrder as any,
metaData: {
orderHash: orderEvent.orderHash,
remainingFillableTakerAssetAmount,
Expand Down Expand Up @@ -89,9 +91,10 @@ export class MeshOrderProvider extends BaseOrderProvider {
*/
public async addOrdersAsync(orders: SignedOrder[]): Promise<AcceptedRejectedOrders> {
const { accepted, rejected } = await utils.attemptAsync(() => this._wsClient.addOrdersAsync(orders));
// TODO(dekz): Remove the any hack when mesh is published v3
return {
accepted: accepted.map(o => o.signedOrder),
rejected: rejected.map(o => ({ order: o.signedOrder, message: o.status.message })),
accepted: accepted.map(o => o.signedOrder) as any,
rejected: rejected.map(o => ({ order: o.signedOrder, message: o.status.message })) as any,
};
}

Expand Down

0 comments on commit ccf40fd

Please sign in to comment.