diff --git a/common/components/GasSlider/components/AdvancedGas.tsx b/common/components/GasSlider/components/AdvancedGas.tsx index 72fc20af..20e9692e 100644 --- a/common/components/GasSlider/components/AdvancedGas.tsx +++ b/common/components/GasSlider/components/AdvancedGas.tsx @@ -58,15 +58,15 @@ class AdvancedGas extends React.Component { -
+
-
+
-
+
( diff --git a/common/selectors/transaction/current.ts b/common/selectors/transaction/current.ts index 94abccc6..310e7579 100644 --- a/common/selectors/transaction/current.ts +++ b/common/selectors/transaction/current.ts @@ -4,6 +4,7 @@ import { AppState } from 'reducers'; import { isEtherUnit, TokenValue, Wei, Address } from 'libs/units'; import { getDataExists, getValidGasCost } from 'selectors/transaction'; import { getCurrentBalance } from 'selectors/wallet'; +import { getOffline } from 'selectors/config'; interface ICurrentValue { raw: string; @@ -42,6 +43,17 @@ const isValidAmount = (state: AppState): boolean => { const currentValue = getCurrentValue(state); const dataExists = getDataExists(state); const validGasCost = getValidGasCost(state); + const isOffline = getOffline(state); + + // If value is an empty string, mark as invalid + if (!currentValue.raw) { + return false; + } + + // If offline, assume amount is valid + if (isOffline) { + return true; + } // We do some wallet validation here. // For some reason with MetaMask, sometimes the currentValue.value is not a null