From 8284f9c2ba80992609149333f8feb70fbe9b1bd1 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Fri, 2 Nov 2018 15:33:00 -0700 Subject: Use generic Maybe --- packages/instant/src/util/maybe_big_number.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'packages/instant/src/util') 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 // if string is a NaN, considered undefined - stringToMaybeBigNumber: (stringValue: string): MaybeBigNumber => { + stringToMaybeBigNumber: (stringValue: string): Maybe => { 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, val2: Maybe): boolean => { if (!_.isUndefined(val1) && !_.isUndefined(val2)) { return val1.equals(val2); } -- cgit v1.2.3