aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/util/maybe_big_number.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/instant/src/util/maybe_big_number.ts')
-rw-r--r--packages/instant/src/util/maybe_big_number.ts14
1 files changed, 7 insertions, 7 deletions
diff --git a/packages/instant/src/util/maybe_big_number.ts b/packages/instant/src/util/maybe_big_number.ts
index 7e206a125..95fbd8695 100644
--- a/packages/instant/src/util/maybe_big_number.ts
+++ b/packages/instant/src/util/maybe_big_number.ts
@@ -16,8 +16,14 @@ export const maybeBigNumberUtil = {
return validBigNumber.isNaN() ? undefined : validBigNumber;
},
+ areMaybeBigNumbersEqual: (val1: Maybe<BigNumber>, val2: Maybe<BigNumber>): boolean => {
+ if (!_.isUndefined(val1) && !_.isUndefined(val2)) {
+ return val1.isEqualTo(val2);
+ }
+ return _.isUndefined(val1) && _.isUndefined(val2);
+ },
// converts a BigNumber or String to the BigNumber used by 0x libraries
- bigNumberOrStringToMaybeBigNumber: (value: any): Maybe<BigNumber> => {
+ toMaybeBigNumber: (value: any): Maybe<BigNumber> => {
if (_.isString(value)) {
return maybeBigNumberUtil.stringToMaybeBigNumber(value);
}
@@ -27,10 +33,4 @@ export const maybeBigNumberUtil = {
}
return undefined;
},
- areMaybeBigNumbersEqual: (val1: Maybe<BigNumber>, val2: Maybe<BigNumber>): boolean => {
- if (!_.isUndefined(val1) && !_.isUndefined(val2)) {
- return val1.isEqualTo(val2);
- }
- return _.isUndefined(val1) && _.isUndefined(val2);
- },
};