Remove 0x.js dependency from sra-report

This commit is contained in:
Leonid Logvinov
2018-05-22 15:45:44 -07:00
parent fc87caa348
commit 68321362c5
2 changed files with 5 additions and 3 deletions

View File

@@ -31,8 +31,9 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/sra-report/README.md",
"dependencies": {
"0x.js": "^0.38.0",
"@0xproject/assert": "^0.2.10",
"@0xproject/types": "^0.7.0",
"@0xproject/order-utils": "^0.0.5",
"@0xproject/connect": "^0.6.13",
"@0xproject/json-schemas": "^0.7.24",
"@0xproject/typescript-typings": "^0.3.2",

View File

@@ -1,6 +1,7 @@
import { SignedOrder, ZeroEx } from '0x.js';
import { HttpClient } from '@0xproject/connect';
import { Schema, schemas as schemasByName } from '@0xproject/json-schemas';
import { getOrderHashHex } from '@0xproject/order-utils';
import { SignedOrder } from '@0xproject/types';
import { logUtils } from '@0xproject/utils';
import chalk from 'chalk';
import * as _ from 'lodash';
@@ -98,7 +99,7 @@ async function createOrderEnvironmentValuesAsync(url: string): Promise<Environme
createEnvironmentValue('orderMaker', orderIfExists.maker),
createEnvironmentValue('orderTaker', orderIfExists.taker),
createEnvironmentValue('orderFeeRecipient', orderIfExists.feeRecipient),
createEnvironmentValue('orderHash', ZeroEx.getOrderHashHex(orderIfExists)),
createEnvironmentValue('orderHash', getOrderHashHex(orderIfExists)),
];
} else {
logUtils.log(`${chalk.red(`No orders from /orders found`)}`);