diff --git a/src/views/Wallet/views/Account/Send/ethereum/components/AdvancedForm/index.js b/src/views/Wallet/views/Account/Send/ethereum/components/AdvancedForm/index.js index 0a4c5662..8f44bd49 100644 --- a/src/views/Wallet/views/Account/Send/ethereum/components/AdvancedForm/index.js +++ b/src/views/Wallet/views/Account/Send/ethereum/components/AdvancedForm/index.js @@ -81,8 +81,8 @@ const AdvancedSettingsSendButtonWrapper = styled.div` justify-content: flex-end; `; -const getGasLimitInputState = (gasLimitErrors: string, gasLimitWarnings: string): string => { - let state = ''; +const getGasLimitInputState = (gasLimitErrors: string, gasLimitWarnings: string): ?string => { + let state = null; if (gasLimitWarnings && !gasLimitErrors) { state = 'warning'; } @@ -92,8 +92,8 @@ const getGasLimitInputState = (gasLimitErrors: string, gasLimitWarnings: string) return state; }; -const getGasPriceInputState = (gasPriceErrors: string, gasPriceWarnings: string): string => { - let state = ''; +const getGasPriceInputState = (gasPriceErrors: string, gasPriceWarnings: string): ?string => { + let state = null; if (gasPriceWarnings && !gasPriceErrors) { state = 'warning'; } @@ -103,8 +103,8 @@ const getGasPriceInputState = (gasPriceErrors: string, gasPriceWarnings: string) return state; }; -const getDataTextareaState = (dataError: string, dataWarning: string): string => { - let state = ''; +const getDataTextareaState = (dataError: string, dataWarning: string): ?string => { + let state = null; if (dataWarning) { state = 'warning'; } diff --git a/src/views/Wallet/views/Account/Send/ethereum/index.js b/src/views/Wallet/views/Account/Send/ethereum/index.js index 3e4867ac..ebe761c3 100644 --- a/src/views/Wallet/views/Account/Send/ethereum/index.js +++ b/src/views/Wallet/views/Account/Send/ethereum/index.js @@ -236,8 +236,8 @@ const getAddressInputState = ( address: string, addressErrors: string, addressWarnings: string -): string => { - let state = ''; +): ?string => { + let state = null; if (address && !addressErrors) { state = 'success'; } @@ -250,8 +250,8 @@ const getAddressInputState = ( return state; }; -const getAmountInputState = (amountErrors: string, amountWarnings: string): string => { - let state = ''; +const getAmountInputState = (amountErrors: string, amountWarnings: string): ?string => { + let state = null; if (amountWarnings && !amountErrors) { state = 'warning'; } diff --git a/src/views/Wallet/views/Account/Send/ripple/components/AdvancedForm/index.js b/src/views/Wallet/views/Account/Send/ripple/components/AdvancedForm/index.js index dd4498aa..24848c01 100644 --- a/src/views/Wallet/views/Account/Send/ripple/components/AdvancedForm/index.js +++ b/src/views/Wallet/views/Account/Send/ripple/components/AdvancedForm/index.js @@ -68,8 +68,8 @@ const StyledIcon = styled(Icon)` margin-left: 6px; `; -const getFeeInputState = (feeErrors: string, feeWarnings: string): string => { - let state = ''; +const getFeeInputState = (feeErrors: string, feeWarnings: string): ?string => { + let state = null; if (feeWarnings && !feeErrors) { state = 'warning'; } @@ -79,8 +79,8 @@ const getFeeInputState = (feeErrors: string, feeWarnings: string): string => { return state; }; -const getDestinationTagInputState = (errors: string, warnings: string): string => { - let state = ''; +const getDestinationTagInputState = (errors: string, warnings: string): ?string => { + let state = null; if (warnings && !errors) { state = 'warning'; } diff --git a/src/views/Wallet/views/Account/Send/ripple/index.js b/src/views/Wallet/views/Account/Send/ripple/index.js index c39c0e48..bc7c28a0 100644 --- a/src/views/Wallet/views/Account/Send/ripple/index.js +++ b/src/views/Wallet/views/Account/Send/ripple/index.js @@ -234,8 +234,8 @@ const getAddressInputState = ( address: string, addressErrors: string, addressWarnings: string -): string => { - let state = ''; +): ?string => { + let state = null; if (address && !addressErrors) { state = 'success'; } @@ -248,8 +248,8 @@ const getAddressInputState = ( return state; }; -const getAmountInputState = (amountErrors: string, amountWarnings: string): string => { - let state = ''; +const getAmountInputState = (amountErrors: string, amountWarnings: string): ?string => { + let state = null; if (amountWarnings && !amountErrors) { state = 'warning'; }