diff options
author | Alex Browne <stephenalexbrowne@gmail.com> | 2018-10-27 04:34:21 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-27 04:34:21 +0800 |
commit | cc7321cb5b97ecb5dcd24134aeddc9cbdd1849d0 (patch) | |
tree | 5750f2eed28ef186867fe8554d8cfb895450acc3 /packages/contract-wrappers/src/utils | |
parent | ae64fc15e0f490078cc99c28993970ff5db945d0 (diff) | |
parent | e1306f55ed65278b18d05344cca1980af490e910 (diff) | |
download | dexon-sol-tools-cc7321cb5b97ecb5dcd24134aeddc9cbdd1849d0.tar dexon-sol-tools-cc7321cb5b97ecb5dcd24134aeddc9cbdd1849d0.tar.gz dexon-sol-tools-cc7321cb5b97ecb5dcd24134aeddc9cbdd1849d0.tar.bz2 dexon-sol-tools-cc7321cb5b97ecb5dcd24134aeddc9cbdd1849d0.tar.lz dexon-sol-tools-cc7321cb5b97ecb5dcd24134aeddc9cbdd1849d0.tar.xz dexon-sol-tools-cc7321cb5b97ecb5dcd24134aeddc9cbdd1849d0.tar.zst dexon-sol-tools-cc7321cb5b97ecb5dcd24134aeddc9cbdd1849d0.zip |
Merge pull request #1178 from 0xProject/fix/linter-improvements
Add --format stylish to tslint and fix linter errors in contract-wrappers.
Diffstat (limited to 'packages/contract-wrappers/src/utils')
-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); + }, }; |