diff options
Diffstat (limited to 'packages/forwarder-helper/src/utils/order_utils.ts')
-rw-r--r-- | packages/forwarder-helper/src/utils/order_utils.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/forwarder-helper/src/utils/order_utils.ts b/packages/forwarder-helper/src/utils/order_utils.ts index d14c6a6d7..482006bf1 100644 --- a/packages/forwarder-helper/src/utils/order_utils.ts +++ b/packages/forwarder-helper/src/utils/order_utils.ts @@ -1,6 +1,8 @@ import { SignedOrder } from '@0xproject/types'; import { BigNumber } from '@0xproject/utils'; +import { constants } from '../constants'; + export const orderUtils = { isOrderExpired(order: SignedOrder): boolean { const millisecondsInSecond = 1000; @@ -13,4 +15,7 @@ export const orderUtils = { : remainingTakerAssetAmount.times(order.makerAssetAmount).dividedToIntegerBy(order.takerAssetAmount); return result; }, + isOpenOrder(order: SignedOrder): boolean { + return order.takerAddress === constants.NULL_ADDRESS; + }, }; |