aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/components
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-03 06:33:00 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-03 06:33:00 +0800
commit8284f9c2ba80992609149333f8feb70fbe9b1bd1 (patch)
tree69858010cb985bec595158556952fe37d7b845c7 /packages/instant/src/components
parent389665d3a1443abaa90ef5ec97e892c70610cac2 (diff)
downloaddexon-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/components')
-rw-r--r--packages/instant/src/components/scaling_amount_input.tsx7
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/instant/src/components/scaling_amount_input.tsx b/packages/instant/src/components/scaling_amount_input.tsx
index ca8ccbe31..5dc719293 100644
--- a/packages/instant/src/components/scaling_amount_input.tsx
+++ b/packages/instant/src/components/scaling_amount_input.tsx
@@ -2,8 +2,9 @@ import { BigNumber } from '@0x/utils';
import * as _ from 'lodash';
import * as React from 'react';
+import { Maybe } from '../types';
+
import { ColorOption } from '../style/theme';
-import { MaybeBigNumber } from '../types';
import { maybeBigNumberUtil } from '../util/maybe_big_number';
import { util } from '../util/util';
@@ -35,7 +36,7 @@ export class ScalingAmountInput extends React.Component<ScalingAmountInputProps,
stringValue: _.isUndefined(props.value) ? '' : props.value.toString(),
};
}
- public componentDidUpdate(prevProps: ScalingAmountInputProps): void {
+ public componentDidUpdate(): void {
const parsedStateValue = stringToMaybeBigNumber(this.state.stringValue);
const currentValue = this.props.value;
@@ -73,7 +74,7 @@ export class ScalingAmountInput extends React.Component<ScalingAmountInputProps,
});
// Trigger onAmountChange with a valid BigNumber, or undefined if the sanitizedValue is invalid or empty
- const bigNumberValue: MaybeBigNumber = _.isEmpty(sanitizedValue)
+ const bigNumberValue: Maybe<BigNumber> = _.isEmpty(sanitizedValue)
? undefined
: stringToMaybeBigNumber(sanitizedValue);