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

HACK: Types as any until Mesh RPC client is published #2242

Merged
merged 2 commits into from
Oct 4, 2019
Merged
Changes from 1 commit
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
8 changes: 5 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,9 @@ 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,
order: orderEvent.signedOrder as any,
metaData: {
orderHash: orderEvent.orderHash,
remainingFillableTakerAssetAmount,
Expand Down Expand Up @@ -89,9 +90,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