aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-utils
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-06-22 16:39:07 +0800
committerFabio Berger <me@fabioberger.com>2018-06-22 16:39:07 +0800
commit3ce295a2af17feef6cd4e3140196501805493719 (patch)
tree964df912ce86d98a211f81f3d6159d797a37c3b3 /packages/order-utils
parenta30107ab867964d371b2d5fc6791c7b1963f1c7b (diff)
parent0515c6acded983bba05320895ea2c2891f37055c (diff)
downloaddexon-0x-contracts-3ce295a2af17feef6cd4e3140196501805493719.tar.gz
dexon-0x-contracts-3ce295a2af17feef6cd4e3140196501805493719.tar.zst
dexon-0x-contracts-3ce295a2af17feef6cd4e3140196501805493719.zip
Merge branch 'v2-prototype' into refactor/check-revert-reasons
* v2-prototype: (40 commits) Use make-promises-safe as a preloader instead of manually importing Updated compiler runs to be 1,000,000 Add event to setSignatureValidatorApproval, rename signer => signerAddress accross all contracts Add senderAddress to Fill and Cancel logs, add comments to events and types Fix Island component Add missing image assets for Chris and Mel Fix some bugs in sol-cov Remove unreachable PreSigned check Fix linting Buttons look hella disabled now Remove border radius, fix width issue for unlock step Add Chris and Mel to about page fix linter issues only call getLocationByOffset if source if defined Set settleOrder and settleMatchedOrders to private Prevent prettier issue Support mobile friendly onboarding flows Removed MixinSettlement. Moved `settleOrder` into `MixinExchangeCore` and `settleMatchedOrders` into `MixinMatchOrders` Migrations after rebasing Linter ...
Diffstat (limited to 'packages/order-utils')
-rw-r--r--packages/order-utils/package.json2
-rw-r--r--packages/order-utils/src/signature_utils.ts2
-rw-r--r--packages/order-utils/test/assert_test.ts1
-rw-r--r--packages/order-utils/test/exchange_transfer_simulator_test.ts1
-rw-r--r--packages/order-utils/test/order_hash_test.ts1
-rw-r--r--packages/order-utils/test/remaining_fillable_calculator_test.ts1
-rw-r--r--packages/order-utils/test/signature_utils_test.ts1
7 files changed, 2 insertions, 7 deletions
diff --git a/packages/order-utils/package.json b/packages/order-utils/package.json
index bd18b7855..62026f9e6 100644
--- a/packages/order-utils/package.json
+++ b/packages/order-utils/package.json
@@ -18,7 +18,7 @@
"test": "yarn run_mocha",
"rebuild_and_test": "run-s build test",
"test:circleci": "yarn test:coverage",
- "run_mocha": "mocha --require source-map-support/register lib/test/**/*_test.js --bail --exit",
+ "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --bail --exit",
"test:coverage": "nyc npm run test --all && yarn coverage:report:lcov",
"coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
"clean": "shx rm -rf lib scripts lib/src/artifacts src/generated_contract_wrappers",
diff --git a/packages/order-utils/src/signature_utils.ts b/packages/order-utils/src/signature_utils.ts
index 44a7203a0..d8703bfda 100644
--- a/packages/order-utils/src/signature_utils.ts
+++ b/packages/order-utils/src/signature_utils.ts
@@ -277,7 +277,7 @@ export function parseECSignature(signature: string): ECSignature {
}
function hashTrezorPersonalMessage(message: Buffer): Buffer {
- const prefix = ethUtil.toBuffer('\x19Ethereum Signed Message:\n' + String.fromCharCode(message.length));
+ const prefix = ethUtil.toBuffer('\x19Ethereum Signed Message:\n' + String.fromCharCode(message.byteLength));
return ethUtil.sha3(Buffer.concat([prefix, message]));
}
diff --git a/packages/order-utils/test/assert_test.ts b/packages/order-utils/test/assert_test.ts
index 4b22ef27d..631971787 100644
--- a/packages/order-utils/test/assert_test.ts
+++ b/packages/order-utils/test/assert_test.ts
@@ -1,5 +1,4 @@
import * as chai from 'chai';
-import 'make-promises-safe';
import 'mocha';
import { assert } from '../src/assert';
diff --git a/packages/order-utils/test/exchange_transfer_simulator_test.ts b/packages/order-utils/test/exchange_transfer_simulator_test.ts
index eeae42698..52385f611 100644
--- a/packages/order-utils/test/exchange_transfer_simulator_test.ts
+++ b/packages/order-utils/test/exchange_transfer_simulator_test.ts
@@ -2,7 +2,6 @@ import { BlockchainLifecycle, devConstants } from '@0xproject/dev-utils';
import { ExchangeContractErrs } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
import * as chai from 'chai';
-import 'make-promises-safe';
import { artifacts } from '../src/artifacts';
import { constants } from '../src/constants';
diff --git a/packages/order-utils/test/order_hash_test.ts b/packages/order-utils/test/order_hash_test.ts
index 7cf6435c2..cc8bfbf8f 100644
--- a/packages/order-utils/test/order_hash_test.ts
+++ b/packages/order-utils/test/order_hash_test.ts
@@ -1,7 +1,6 @@
import { Order } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
import * as chai from 'chai';
-import 'make-promises-safe';
import 'mocha';
import { constants, orderHashUtils } from '../src';
diff --git a/packages/order-utils/test/remaining_fillable_calculator_test.ts b/packages/order-utils/test/remaining_fillable_calculator_test.ts
index c99d10f3f..a5a3b7fc6 100644
--- a/packages/order-utils/test/remaining_fillable_calculator_test.ts
+++ b/packages/order-utils/test/remaining_fillable_calculator_test.ts
@@ -2,7 +2,6 @@ import { SignedOrder } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as chai from 'chai';
-import 'make-promises-safe';
import 'mocha';
import { RemainingFillableCalculator } from '../src/remaining_fillable_calculator';
diff --git a/packages/order-utils/test/signature_utils_test.ts b/packages/order-utils/test/signature_utils_test.ts
index 74033104a..5714f9671 100644
--- a/packages/order-utils/test/signature_utils_test.ts
+++ b/packages/order-utils/test/signature_utils_test.ts
@@ -2,7 +2,6 @@ import { BigNumber } from '@0xproject/utils';
import * as chai from 'chai';
import { JSONRPCErrorCallback, JSONRPCRequestPayload } from 'ethereum-types';
import * as _ from 'lodash';
-import 'make-promises-safe';
import 'mocha';
import * as Sinon from 'sinon';