aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/src/utils
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-03-20 00:56:46 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-03-20 00:56:46 +0800
commit11bac66046e10cd152d328f03f97e04c10d9a40c (patch)
tree926741e9383264f5c121dc8f046adfabde699eec /packages/0x.js/src/utils
parente4ea6e1ec3693b2106b1ba28869277488ebca6d3 (diff)
parent2a438419ab3bc32dba43918cf2eb480439ef81de (diff)
downloaddexon-sol-tools-11bac66046e10cd152d328f03f97e04c10d9a40c.tar
dexon-sol-tools-11bac66046e10cd152d328f03f97e04c10d9a40c.tar.gz
dexon-sol-tools-11bac66046e10cd152d328f03f97e04c10d9a40c.tar.bz2
dexon-sol-tools-11bac66046e10cd152d328f03f97e04c10d9a40c.tar.lz
dexon-sol-tools-11bac66046e10cd152d328f03f97e04c10d9a40c.tar.xz
dexon-sol-tools-11bac66046e10cd152d328f03f97e04c10d9a40c.tar.zst
dexon-sol-tools-11bac66046e10cd152d328f03f97e04c10d9a40c.zip
Merge branch 'development' into feature/sra-report/collection-tests
* development: (26 commits) Change title Add Blake and Zach to About page Re-size Jacob and Tom's images Manually publish 0x.js back to a working state Publish Publish Fix 0x.js assets Remove assets from connect and _bundles from packages that don't generate the folder Publish Fix packages that aren't working as expected Make new packages default to public on publish Add new public packages to top-level README Update top-level package.json Fix incorrect new versions Fix path to assets Publish Updated CHANGELOGS Fix quotation marks Add a complex test for ast visitor Move opcodes to constants ...
Diffstat (limited to 'packages/0x.js/src/utils')
-rw-r--r--packages/0x.js/src/utils/assert.ts2
-rw-r--r--packages/0x.js/src/utils/order_state_utils.ts10
-rw-r--r--packages/0x.js/src/utils/order_validation_utils.ts3
-rw-r--r--packages/0x.js/src/utils/signature_utils.ts3
-rw-r--r--packages/0x.js/src/utils/utils.ts4
5 files changed, 7 insertions, 15 deletions
diff --git a/packages/0x.js/src/utils/assert.ts b/packages/0x.js/src/utils/assert.ts
index c21f2dbca..5e8004cd0 100644
--- a/packages/0x.js/src/utils/assert.ts
+++ b/packages/0x.js/src/utils/assert.ts
@@ -3,11 +3,11 @@ import { assert as sharedAssert } from '@0xproject/assert';
// tslint:disable-next-line:no-unused-variable
import { Schema } from '@0xproject/json-schemas';
// tslint:disable-next-line:no-unused-variable
+import { ECSignature } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as _ from 'lodash';
-import { ECSignature } from '../types';
import { signatureUtils } from '../utils/signature_utils';
export const assert = {
diff --git a/packages/0x.js/src/utils/order_state_utils.ts b/packages/0x.js/src/utils/order_state_utils.ts
index b7a55ff42..38189443b 100644
--- a/packages/0x.js/src/utils/order_state_utils.ts
+++ b/packages/0x.js/src/utils/order_state_utils.ts
@@ -1,3 +1,4 @@
+import { SignedOrder } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
import * as _ from 'lodash';
@@ -6,14 +7,7 @@ import { ExchangeWrapper } from '../contract_wrappers/exchange_wrapper';
import { RemainingFillableCalculator } from '../order_watcher/remaining_fillable_calculator';
import { BalanceAndProxyAllowanceLazyStore } from '../stores/balance_proxy_allowance_lazy_store';
import { OrderFilledCancelledLazyStore } from '../stores/order_filled_cancelled_lazy_store';
-import {
- ExchangeContractErrs,
- OrderRelevantState,
- OrderState,
- OrderStateInvalid,
- OrderStateValid,
- SignedOrder,
-} from '../types';
+import { ExchangeContractErrs, OrderRelevantState, OrderState, OrderStateInvalid, OrderStateValid } from '../types';
const ACCEPTABLE_RELATIVE_ROUNDING_ERROR = 0.0001;
diff --git a/packages/0x.js/src/utils/order_validation_utils.ts b/packages/0x.js/src/utils/order_validation_utils.ts
index 917d414c8..f32bf43d0 100644
--- a/packages/0x.js/src/utils/order_validation_utils.ts
+++ b/packages/0x.js/src/utils/order_validation_utils.ts
@@ -1,9 +1,10 @@
+import { Order, SignedOrder } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
import * as _ from 'lodash';
import { ZeroEx } from '../0x';
import { ExchangeWrapper } from '../contract_wrappers/exchange_wrapper';
-import { ExchangeContractErrs, Order, SignedOrder, TradeSide, TransferType, ZeroExError } from '../types';
+import { ExchangeContractErrs, TradeSide, TransferType, ZeroExError } from '../types';
import { constants } from '../utils/constants';
import { utils } from '../utils/utils';
diff --git a/packages/0x.js/src/utils/signature_utils.ts b/packages/0x.js/src/utils/signature_utils.ts
index b0f1d61ef..46f167339 100644
--- a/packages/0x.js/src/utils/signature_utils.ts
+++ b/packages/0x.js/src/utils/signature_utils.ts
@@ -1,7 +1,6 @@
+import { ECSignature } from '@0xproject/types';
import * as ethUtil from 'ethereumjs-util';
-import { ECSignature } from '../types';
-
export const signatureUtils = {
isValidSignature(data: string, signature: ECSignature, signerAddress: string): boolean {
const dataBuff = ethUtil.toBuffer(data);
diff --git a/packages/0x.js/src/utils/utils.ts b/packages/0x.js/src/utils/utils.ts
index 3e98de84f..c8bcd907e 100644
--- a/packages/0x.js/src/utils/utils.ts
+++ b/packages/0x.js/src/utils/utils.ts
@@ -1,12 +1,10 @@
-import { SolidityTypes } from '@0xproject/types';
+import { Order, SignedOrder, SolidityTypes } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
import BN = require('bn.js');
import * as ethABI from 'ethereumjs-abi';
import * as ethUtil from 'ethereumjs-util';
import * as _ from 'lodash';
-import { Order, SignedOrder } from '../types';
-
export const utils = {
/**
* Converts BigNumber instance to BN