Slider prop error fix (#743)

* Cast to float.

* Force gas price and limit inputs to be numbers.
This commit is contained in:
William O'Beirne 2018-01-08 00:30:56 -05:00 committed by Daniel Ternyak
parent ce3b513354
commit 62381427e4
2 changed files with 3 additions and 1 deletions

View File

@ -19,6 +19,7 @@ export default class AdvancedGas extends React.Component<Props> {
<label>{translate('OFFLINE_Step2_Label_3')} (gwei)</label>
<input
className="form-control"
type="number"
value={this.props.gasPrice}
onChange={this.handleGasPriceChange}
/>
@ -28,6 +29,7 @@ export default class AdvancedGas extends React.Component<Props> {
<label>{translate('OFFLINE_Step2_Label_4')}</label>
<input
className="form-control"
type="number"
value={this.props.gasLimit}
onChange={this.handleGasLimitChange}
/>

View File

@ -26,7 +26,7 @@ export default class SimpleGas extends React.Component<Props> {
onChange={this.handleSlider}
min={gasPriceDefaults.gasPriceMinGwei}
max={gasPriceDefaults.gasPriceMaxGwei}
value={gasPrice}
value={parseFloat(gasPrice)}
/>
<div className="SimpleGas-slider-labels">
<span>{translate('Cheap')}</span>