aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-utils/src
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-08-06 05:15:58 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-08-06 05:15:58 +0800
commit3cb955c136bf47b5f40cdbc44bcc4d19ec6d6453 (patch)
tree333f93d99e32e75739e3f76bbaa8c393249f71ff /packages/order-utils/src
parent47673ba4bb2932051cb810bd0012c208665eb277 (diff)
downloaddexon-sol-tools-3cb955c136bf47b5f40cdbc44bcc4d19ec6d6453.tar
dexon-sol-tools-3cb955c136bf47b5f40cdbc44bcc4d19ec6d6453.tar.gz
dexon-sol-tools-3cb955c136bf47b5f40cdbc44bcc4d19ec6d6453.tar.bz2
dexon-sol-tools-3cb955c136bf47b5f40cdbc44bcc4d19ec6d6453.tar.lz
dexon-sol-tools-3cb955c136bf47b5f40cdbc44bcc4d19ec6d6453.tar.xz
dexon-sol-tools-3cb955c136bf47b5f40cdbc44bcc4d19ec6d6453.tar.zst
dexon-sol-tools-3cb955c136bf47b5f40cdbc44bcc4d19ec6d6453.zip
Move CreateOrderOpts into shared types
Diffstat (limited to 'packages/order-utils/src')
-rw-r--r--packages/order-utils/src/index.ts10
-rw-r--r--packages/order-utils/src/order_factory.ts12
-rw-r--r--packages/order-utils/src/types.ts12
3 files changed, 22 insertions, 12 deletions
diff --git a/packages/order-utils/src/index.ts b/packages/order-utils/src/index.ts
index 76be63bb8..129eb0a3d 100644
--- a/packages/order-utils/src/index.ts
+++ b/packages/order-utils/src/index.ts
@@ -13,7 +13,15 @@ export { orderFactory } from './order_factory';
export { constants } from './constants';
export { crypto } from './crypto';
export { generatePseudoRandomSalt } from './salt';
-export { OrderError, MessagePrefixType, MessagePrefixOpts, EIP712Parameter, EIP712Schema, EIP712Types } from './types';
+export {
+ CreateOrderOpts,
+ OrderError,
+ MessagePrefixType,
+ MessagePrefixOpts,
+ EIP712Parameter,
+ EIP712Schema,
+ EIP712Types,
+} from './types';
export { AbstractBalanceAndProxyAllowanceFetcher } from './abstract/abstract_balance_and_proxy_allowance_fetcher';
export { AbstractOrderFilledCancelledFetcher } from './abstract/abstract_order_filled_cancelled_fetcher';
export { BalanceAndProxyAllowanceLazyStore } from './store/balance_and_proxy_allowance_lazy_store';
diff --git a/packages/order-utils/src/order_factory.ts b/packages/order-utils/src/order_factory.ts
index 5901d38c3..14727fd97 100644
--- a/packages/order-utils/src/order_factory.ts
+++ b/packages/order-utils/src/order_factory.ts
@@ -8,17 +8,7 @@ import { constants } from './constants';
import { orderHashUtils } from './order_hash';
import { generatePseudoRandomSalt } from './salt';
import { ecSignOrderHashAsync } from './signature_utils';
-import { MessagePrefixType } from './types';
-
-export interface CreateOrderOpts {
- takerAddress?: string;
- senderAddress?: string;
- makerFee?: BigNumber;
- takerFee?: BigNumber;
- feeRecipientAddress?: string;
- salt?: BigNumber;
- expirationTimeSeconds?: BigNumber;
-}
+import { CreateOrderOpts, MessagePrefixType } from './types';
export const orderFactory = {
createOrder(
diff --git a/packages/order-utils/src/types.ts b/packages/order-utils/src/types.ts
index b08e74e71..f44e94349 100644
--- a/packages/order-utils/src/types.ts
+++ b/packages/order-utils/src/types.ts
@@ -1,3 +1,5 @@
+import { BigNumber } from '@0xproject/utils';
+
export enum OrderError {
InvalidSignature = 'INVALID_SIGNATURE',
}
@@ -51,3 +53,13 @@ export enum EIP712Types {
String = 'string',
Uint256 = 'uint256',
}
+
+export interface CreateOrderOpts {
+ takerAddress?: string;
+ senderAddress?: string;
+ makerFee?: BigNumber;
+ takerFee?: BigNumber;
+ feeRecipientAddress?: string;
+ salt?: BigNumber;
+ expirationTimeSeconds?: BigNumber;
+}