From 62381427e4e8a4604c30bca94562cf4ab1edd610 Mon Sep 17 00:00:00 2001 From: William O'Beirne Date: Mon, 8 Jan 2018 00:30:56 -0500 Subject: [PATCH] Slider prop error fix (#743) * Cast to float. * Force gas price and limit inputs to be numbers. --- common/components/GasSlider/components/AdvancedGas.tsx | 2 ++ common/components/GasSlider/components/SimpleGas.tsx | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/common/components/GasSlider/components/AdvancedGas.tsx b/common/components/GasSlider/components/AdvancedGas.tsx index 0b290bb6..bcc3d6c1 100644 --- a/common/components/GasSlider/components/AdvancedGas.tsx +++ b/common/components/GasSlider/components/AdvancedGas.tsx @@ -19,6 +19,7 @@ export default class AdvancedGas extends React.Component { @@ -28,6 +29,7 @@ export default class AdvancedGas extends React.Component { diff --git a/common/components/GasSlider/components/SimpleGas.tsx b/common/components/GasSlider/components/SimpleGas.tsx index 5fe71ddf..4e0eaa06 100644 --- a/common/components/GasSlider/components/SimpleGas.tsx +++ b/common/components/GasSlider/components/SimpleGas.tsx @@ -26,7 +26,7 @@ export default class SimpleGas extends React.Component { onChange={this.handleSlider} min={gasPriceDefaults.gasPriceMinGwei} max={gasPriceDefaults.gasPriceMaxGwei} - value={gasPrice} + value={parseFloat(gasPrice)} />
{translate('Cheap')}