aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/0x.js.ts3
-rw-r--r--test/schema_test.ts3
2 files changed, 2 insertions, 4 deletions
diff --git a/src/0x.js.ts b/src/0x.js.ts
index 2bf8cad5e..7a5d14aa8 100644
--- a/src/0x.js.ts
+++ b/src/0x.js.ts
@@ -130,8 +130,7 @@ export class ZeroEx {
* Computes the orderHash for a given order and returns it as a hex encoded string.
*/
public async getOrderHashHexAsync(order: Order|SignedOrder): Promise<string> {
- assert.doesConformToSchema('order', SchemaValidator.convertToJSONSchemaCompatibleObject(order as object),
- orderSchema);
+ assert.doesConformToSchema('order', order, orderSchema);
const exchangeContractAddr = await this.getExchangeAddressAsync();
const orderHashHex = utils.getOrderHashHex(order, exchangeContractAddr);
diff --git a/test/schema_test.ts b/test/schema_test.ts
index d35ed4516..8d786fb73 100644
--- a/test/schema_test.ts
+++ b/test/schema_test.ts
@@ -38,8 +38,7 @@ describe('Schema', () => {
'.3': '0.3',
};
_.forEach(testCases, (serialized: string, input: string) => {
- expect(SchemaValidator.convertToJSONSchemaCompatibleObject(new BigNumber(input)))
- .to.be.equal(serialized);
+ expect(JSON.parse(JSON.stringify(new BigNumber(input)))).to.be.equal(serialized);
});
});
});