diff options
author | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-02 07:32:14 +0800 |
---|---|---|
committer | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-02 07:32:14 +0800 |
commit | a2e1bf0e6287e86c226b0801311f6f4498c893ed (patch) | |
tree | 5c03514c0d0afce1aba61341c079822030e0ece0 /packages/instant/src/components/scaling_amount_input.tsx | |
parent | 7c30fd4b2da83c9522f9137f4d18e6c308f2b66f (diff) | |
download | dexon-0x-contracts-a2e1bf0e6287e86c226b0801311f6f4498c893ed.tar.gz dexon-0x-contracts-a2e1bf0e6287e86c226b0801311f6f4498c893ed.tar.zst dexon-0x-contracts-a2e1bf0e6287e86c226b0801311f6f4498c893ed.zip |
Getting rid of BigNumberInput in favor of BigNumber
Diffstat (limited to 'packages/instant/src/components/scaling_amount_input.tsx')
-rw-r--r-- | packages/instant/src/components/scaling_amount_input.tsx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/instant/src/components/scaling_amount_input.tsx b/packages/instant/src/components/scaling_amount_input.tsx index cfbf3b7cc..4b046e8da 100644 --- a/packages/instant/src/components/scaling_amount_input.tsx +++ b/packages/instant/src/components/scaling_amount_input.tsx @@ -1,8 +1,8 @@ +import { BigNumber } from '@0x/utils'; import * as _ from 'lodash'; import * as React from 'react'; import { ColorOption } from '../style/theme'; -import { BigNumberInput } from '../util/big_number_input'; import { util } from '../util/util'; import { ScalingInput } from './scaling_input'; @@ -12,8 +12,8 @@ export interface ScalingAmountInputProps { maxFontSizePx: number; textLengthThreshold: number; fontColor?: ColorOption; - value?: BigNumberInput; - onChange: (value?: BigNumberInput) => void; + value?: BigNumber; + onChange: (value?: BigNumber) => void; onFontSizeChange: (fontSizePx: number) => void; } @@ -32,7 +32,7 @@ export class ScalingAmountInput extends React.Component<ScalingAmountInputProps> onFontSizeChange={onFontSizeChange} fontColor={fontColor} onChange={this._handleChange} - value={!_.isUndefined(value) ? value.toDisplayString() : ''} + value={!_.isUndefined(value) ? value.toString() : ''} placeholder="0.00" emptyInputWidthCh={3.5} isDisabled={this.props.isDisabled} @@ -44,7 +44,7 @@ export class ScalingAmountInput extends React.Component<ScalingAmountInputProps> let bigNumberValue; if (!_.isEmpty(value)) { try { - bigNumberValue = new BigNumberInput(value); + bigNumberValue = new BigNumber(value); } catch { // We don't want to allow values that can't be a BigNumber, so don't even call onChange. return; |