diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-03-15 06:02:58 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-03-15 07:33:10 +0800 |
commit | ffe7363776077e2363afc23a8e4c5e2ea420aefe (patch) | |
tree | 6eb19a3944d07c1ff5ce5903b8ed496b07546894 /packages/0x.js/src/utils | |
parent | 4a27a7dc581fc6c8a3d4e212ca3712c249a5b417 (diff) | |
download | dexon-sol-tools-ffe7363776077e2363afc23a8e4c5e2ea420aefe.tar dexon-sol-tools-ffe7363776077e2363afc23a8e4c5e2ea420aefe.tar.gz dexon-sol-tools-ffe7363776077e2363afc23a8e4c5e2ea420aefe.tar.bz2 dexon-sol-tools-ffe7363776077e2363afc23a8e4c5e2ea420aefe.tar.lz dexon-sol-tools-ffe7363776077e2363afc23a8e4c5e2ea420aefe.tar.xz dexon-sol-tools-ffe7363776077e2363afc23a8e4c5e2ea420aefe.tar.zst dexon-sol-tools-ffe7363776077e2363afc23a8e4c5e2ea420aefe.zip |
Add SignedOrder, Order, and ECSignature types to the types package
Diffstat (limited to 'packages/0x.js/src/utils')
-rw-r--r-- | packages/0x.js/src/utils/assert.ts | 2 | ||||
-rw-r--r-- | packages/0x.js/src/utils/order_state_utils.ts | 10 | ||||
-rw-r--r-- | packages/0x.js/src/utils/order_validation_utils.ts | 3 | ||||
-rw-r--r-- | packages/0x.js/src/utils/signature_utils.ts | 3 | ||||
-rw-r--r-- | packages/0x.js/src/utils/utils.ts | 4 |
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 |