aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/util/order_factory.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/contracts/util/order_factory.ts')
-rw-r--r--packages/contracts/util/order_factory.ts40
1 files changed, 20 insertions, 20 deletions
diff --git a/packages/contracts/util/order_factory.ts b/packages/contracts/util/order_factory.ts
index 55034655b..a45877de0 100644
--- a/packages/contracts/util/order_factory.ts
+++ b/packages/contracts/util/order_factory.ts
@@ -6,24 +6,24 @@ import { Order } from './order';
import { DefaultOrderParams, OptionalOrderParams, OrderParams } from './types';
export class OrderFactory {
- private _defaultOrderParams: DefaultOrderParams;
- constructor(defaultOrderParams: DefaultOrderParams) {
- this._defaultOrderParams = defaultOrderParams;
- }
- public async newSignedOrderAsync(customOrderParams: OptionalOrderParams = {}) {
- const randomExpiration = new BigNumber(Math.floor((Date.now() + Math.random() * 100000000000) / 1000));
- const orderParams: OrderParams = _.assign(
- {},
- {
- expirationTimestampInSec: randomExpiration,
- salt: ZeroEx.generatePseudoRandomSalt(),
- taker: ZeroEx.NULL_ADDRESS,
- },
- this._defaultOrderParams,
- customOrderParams,
- );
- const order = new Order(orderParams);
- await order.signAsync();
- return order;
- }
+ private _defaultOrderParams: DefaultOrderParams;
+ constructor(defaultOrderParams: DefaultOrderParams) {
+ this._defaultOrderParams = defaultOrderParams;
+ }
+ public async newSignedOrderAsync(customOrderParams: OptionalOrderParams = {}) {
+ const randomExpiration = new BigNumber(Math.floor((Date.now() + Math.random() * 100000000000) / 1000));
+ const orderParams: OrderParams = _.assign(
+ {},
+ {
+ expirationTimestampInSec: randomExpiration,
+ salt: ZeroEx.generatePseudoRandomSalt(),
+ taker: ZeroEx.NULL_ADDRESS,
+ },
+ this._defaultOrderParams,
+ customOrderParams,
+ );
+ const order = new Order(orderParams);
+ await order.signAsync();
+ return order;
+ }
}