From 0acc7196b8fb64644cdc71c7f75c5268e44b378e Mon Sep 17 00:00:00 2001 From: Vasek Mlejnsky Date: Thu, 20 Sep 2018 10:52:28 +0200 Subject: [PATCH] Fix inputs' state handling --- src/views/Wallet/views/AccountSend/index.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/views/Wallet/views/AccountSend/index.js b/src/views/Wallet/views/AccountSend/index.js index 3a8f1a64..50120b76 100644 --- a/src/views/Wallet/views/AccountSend/index.js +++ b/src/views/Wallet/views/AccountSend/index.js @@ -203,9 +203,11 @@ class AccountSend extends Component { let state = ''; if (address && !addressErrors) { state = 'success'; - } else if (addressWarnings && !addressErrors) { + } + if (addressWarnings && !addressErrors) { state = 'warning'; - } else if (addressErrors) { + } + if (addressErrors) { state = 'error'; } return state; @@ -215,7 +217,8 @@ class AccountSend extends Component { let state = ''; if (amountWarnings && !amountErrors) { state = 'warning'; - } else if (amountErrors) { + } + if (amountErrors) { state = 'error'; } return state; @@ -225,7 +228,8 @@ class AccountSend extends Component { let state = ''; if (gasLimitWarnings && !gasLimitErrors) { state = 'warning'; - } else if (gasLimitErrors) { + } + if (gasLimitErrors) { state = 'error'; } return state; @@ -235,7 +239,8 @@ class AccountSend extends Component { let state = ''; if (gasPriceWarnings && !gasPriceErrors) { state = 'warning'; - } else if (gasPriceErrors) { + } + if (gasPriceErrors) { state = 'error'; } return state;