mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-02-19 22:38:12 +00:00
Slider prop error fix (#743)
* Cast to float. * Force gas price and limit inputs to be numbers.
This commit is contained in:
parent
ce3b513354
commit
62381427e4
@ -19,6 +19,7 @@ export default class AdvancedGas extends React.Component<Props> {
|
|||||||
<label>{translate('OFFLINE_Step2_Label_3')} (gwei)</label>
|
<label>{translate('OFFLINE_Step2_Label_3')} (gwei)</label>
|
||||||
<input
|
<input
|
||||||
className="form-control"
|
className="form-control"
|
||||||
|
type="number"
|
||||||
value={this.props.gasPrice}
|
value={this.props.gasPrice}
|
||||||
onChange={this.handleGasPriceChange}
|
onChange={this.handleGasPriceChange}
|
||||||
/>
|
/>
|
||||||
@ -28,6 +29,7 @@ export default class AdvancedGas extends React.Component<Props> {
|
|||||||
<label>{translate('OFFLINE_Step2_Label_4')}</label>
|
<label>{translate('OFFLINE_Step2_Label_4')}</label>
|
||||||
<input
|
<input
|
||||||
className="form-control"
|
className="form-control"
|
||||||
|
type="number"
|
||||||
value={this.props.gasLimit}
|
value={this.props.gasLimit}
|
||||||
onChange={this.handleGasLimitChange}
|
onChange={this.handleGasLimitChange}
|
||||||
/>
|
/>
|
||||||
|
@ -26,7 +26,7 @@ export default class SimpleGas extends React.Component<Props> {
|
|||||||
onChange={this.handleSlider}
|
onChange={this.handleSlider}
|
||||||
min={gasPriceDefaults.gasPriceMinGwei}
|
min={gasPriceDefaults.gasPriceMinGwei}
|
||||||
max={gasPriceDefaults.gasPriceMaxGwei}
|
max={gasPriceDefaults.gasPriceMaxGwei}
|
||||||
value={gasPrice}
|
value={parseFloat(gasPrice)}
|
||||||
/>
|
/>
|
||||||
<div className="SimpleGas-slider-labels">
|
<div className="SimpleGas-slider-labels">
|
||||||
<span>{translate('Cheap')}</span>
|
<span>{translate('Cheap')}</span>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user