diff options
author | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-10-27 06:34:51 +0800 |
---|---|---|
committer | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-10-27 06:34:51 +0800 |
commit | 6ad8ac6a4836bf926666f2d05e91d2d4b31c6b19 (patch) | |
tree | d159e73abfb56c9b7d1cccd5fea2fdf84411ceb5 /packages/contract-wrappers/src/utils/utils.ts | |
parent | 86febc3cce1135d2345f0048c205c3c524a66733 (diff) | |
parent | e73fceaa20738175e660caf4dee442d4c598c1b5 (diff) | |
download | dexon-0x-contracts-6ad8ac6a4836bf926666f2d05e91d2d4b31c6b19.tar.gz dexon-0x-contracts-6ad8ac6a4836bf926666f2d05e91d2d4b31c6b19.tar.zst dexon-0x-contracts-6ad8ac6a4836bf926666f2d05e91d2d4b31c6b19.zip |
Merge branch 'development' into feature/not-enough-eth
Diffstat (limited to 'packages/contract-wrappers/src/utils/utils.ts')
-rw-r--r-- | packages/contract-wrappers/src/utils/utils.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/contract-wrappers/src/utils/utils.ts b/packages/contract-wrappers/src/utils/utils.ts index fbacdaa28..0b3270e78 100644 --- a/packages/contract-wrappers/src/utils/utils.ts +++ b/packages/contract-wrappers/src/utils/utils.ts @@ -1,5 +1,6 @@ import { BigNumber } from '@0x/utils'; import { Web3Wrapper } from '@0x/web3-wrapper'; +import * as _ from 'lodash'; import { constants } from './constants'; @@ -14,4 +15,7 @@ export const utils = { numberPercentageToEtherTokenAmountPercentage(percentage: number): BigNumber { return Web3Wrapper.toBaseUnitAmount(constants.ONE_AMOUNT, constants.ETHER_TOKEN_DECIMALS).mul(percentage); }, + removeUndefinedProperties<T extends object>(obj: T): Partial<T> { + return _.pickBy(obj); + }, }; |