diff options
Diffstat (limited to 'packages/contracts/util')
-rw-r--r-- | packages/contracts/util/signed_order_utils.ts | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/packages/contracts/util/signed_order_utils.ts b/packages/contracts/util/signed_order_utils.ts deleted file mode 100644 index 3e5d2f226..000000000 --- a/packages/contracts/util/signed_order_utils.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { SignedOrder } from '0x.js'; -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; -import ethUtil = require('ethereumjs-util'); -import * as _ from 'lodash'; - -import { crypto } from './crypto'; - -export const signedOrderUtils = { - createFill: ( - signedOrder: SignedOrder, - takerTokenFillAmount?: BigNumber, - ) => { - const fill = { - ...signedOrderUtils.getOrderAddressesAndValues(signedOrder), - takerTokenFillAmount: takerTokenFillAmount || signedOrder.takerTokenAmount, - ...signedOrder.ecSignature, - }; - return fill; - }, - createCancel(signedOrder: SignedOrder, takerTokenCancelAmount?: BigNumber) { - const cancel = { - ...signedOrderUtils.getOrderAddressesAndValues(signedOrder), - takerTokenCancelAmount: takerTokenCancelAmount || signedOrder.takerTokenAmount, - }; - return cancel; - }, - getOrderAddressesAndValues(signedOrder: SignedOrder) { - return { - orderAddresses: [ - signedOrder.maker, - signedOrder.taker, - signedOrder.makerTokenAddress, - signedOrder.takerTokenAddress, - signedOrder.feeRecipient, - ], - orderValues: [ - signedOrder.makerTokenAmount, - signedOrder.takerTokenAmount, - signedOrder.makerFee, - signedOrder.takerFee, - signedOrder.expirationUnixTimestampSec, - signedOrder.salt, - ], - }; - }, -}; |