diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-10-24 07:59:31 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-10-24 07:59:31 +0800 |
commit | 7ccfa8a8afe103e1cc2920724b6f17644fe5629d (patch) | |
tree | a0153a9b55f27d8daad436e49d6042fbe18154d5 /packages/instant/src/components | |
parent | 751b87af962d5b1f9f65514c10de2f7cb0b13c34 (diff) | |
download | dexon-0x-contracts-7ccfa8a8afe103e1cc2920724b6f17644fe5629d.tar.gz dexon-0x-contracts-7ccfa8a8afe103e1cc2920724b6f17644fe5629d.tar.zst dexon-0x-contracts-7ccfa8a8afe103e1cc2920724b6f17644fe5629d.zip |
feat: support half-written decimal numbers in BigNumberInput
Diffstat (limited to 'packages/instant/src/components')
-rw-r--r-- | packages/instant/src/components/scaling_amount_input.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/instant/src/components/scaling_amount_input.tsx b/packages/instant/src/components/scaling_amount_input.tsx index 233e29cff..23a15305a 100644 --- a/packages/instant/src/components/scaling_amount_input.tsx +++ b/packages/instant/src/components/scaling_amount_input.tsx @@ -3,6 +3,7 @@ import * as _ from 'lodash'; import * as React from 'react'; import { ColorOption } from '../style/theme'; +import { BigNumberInput } from '../util/big_number'; import { util } from '../util/util'; import { ScalingInput } from './scaling_input'; @@ -41,7 +42,7 @@ export class ScalingAmountInput extends React.Component<ScalingAmountInputProps> let bigNumberValue; if (!_.isEmpty(value)) { try { - bigNumberValue = new BigNumber(event.target.value); + bigNumberValue = new BigNumberInput(event.target.value); } catch { // We don't want to allow values that can't be a BigNumber, so don't even call onChange. return; |