diff options
author | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-03 06:33:00 +0800 |
---|---|---|
committer | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-03 06:33:00 +0800 |
commit | 8284f9c2ba80992609149333f8feb70fbe9b1bd1 (patch) | |
tree | 69858010cb985bec595158556952fe37d7b845c7 /packages/instant/src/util | |
parent | 389665d3a1443abaa90ef5ec97e892c70610cac2 (diff) | |
download | dexon-sol-tools-8284f9c2ba80992609149333f8feb70fbe9b1bd1.tar dexon-sol-tools-8284f9c2ba80992609149333f8feb70fbe9b1bd1.tar.gz dexon-sol-tools-8284f9c2ba80992609149333f8feb70fbe9b1bd1.tar.bz2 dexon-sol-tools-8284f9c2ba80992609149333f8feb70fbe9b1bd1.tar.lz dexon-sol-tools-8284f9c2ba80992609149333f8feb70fbe9b1bd1.tar.xz dexon-sol-tools-8284f9c2ba80992609149333f8feb70fbe9b1bd1.tar.zst dexon-sol-tools-8284f9c2ba80992609149333f8feb70fbe9b1bd1.zip |
Use generic Maybe
Diffstat (limited to 'packages/instant/src/util')
-rw-r--r-- | packages/instant/src/util/maybe_big_number.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/instant/src/util/maybe_big_number.ts b/packages/instant/src/util/maybe_big_number.ts index 113ba552f..9d3746e10 100644 --- a/packages/instant/src/util/maybe_big_number.ts +++ b/packages/instant/src/util/maybe_big_number.ts @@ -1,12 +1,12 @@ import { BigNumber } from '@0x/utils'; import * as _ from 'lodash'; -import { MaybeBigNumber } from '../types'; +import { Maybe } from '../types'; export const maybeBigNumberUtil = { - // converts a string to a MaybeBigNumber + // converts a string to a Maybe<BigNumber> // if string is a NaN, considered undefined - stringToMaybeBigNumber: (stringValue: string): MaybeBigNumber => { + stringToMaybeBigNumber: (stringValue: string): Maybe<BigNumber> => { let validBigNumber: BigNumber; try { validBigNumber = new BigNumber(stringValue); @@ -16,7 +16,7 @@ export const maybeBigNumberUtil = { return validBigNumber.isNaN() ? undefined : validBigNumber; }, - areMaybeBigNumbersEqual: (val1: MaybeBigNumber, val2: MaybeBigNumber): boolean => { + areMaybeBigNumbersEqual: (val1: Maybe<BigNumber>, val2: Maybe<BigNumber>): boolean => { if (!_.isUndefined(val1) && !_.isUndefined(val2)) { return val1.equals(val2); } |