1
0
mirror of https://github.com/trezor/trezor-wallet synced 2025-01-23 06:21:06 +00:00

Fix inputs' state handling

This commit is contained in:
Vasek Mlejnsky 2018-09-20 10:52:28 +02:00
parent e135e103c5
commit 0acc7196b8

View File

@ -203,9 +203,11 @@ class AccountSend extends Component<Props, State> {
let state = ''; let state = '';
if (address && !addressErrors) { if (address && !addressErrors) {
state = 'success'; state = 'success';
} else if (addressWarnings && !addressErrors) { }
if (addressWarnings && !addressErrors) {
state = 'warning'; state = 'warning';
} else if (addressErrors) { }
if (addressErrors) {
state = 'error'; state = 'error';
} }
return state; return state;
@ -215,7 +217,8 @@ class AccountSend extends Component<Props, State> {
let state = ''; let state = '';
if (amountWarnings && !amountErrors) { if (amountWarnings && !amountErrors) {
state = 'warning'; state = 'warning';
} else if (amountErrors) { }
if (amountErrors) {
state = 'error'; state = 'error';
} }
return state; return state;
@ -225,7 +228,8 @@ class AccountSend extends Component<Props, State> {
let state = ''; let state = '';
if (gasLimitWarnings && !gasLimitErrors) { if (gasLimitWarnings && !gasLimitErrors) {
state = 'warning'; state = 'warning';
} else if (gasLimitErrors) { }
if (gasLimitErrors) {
state = 'error'; state = 'error';
} }
return state; return state;
@ -235,7 +239,8 @@ class AccountSend extends Component<Props, State> {
let state = ''; let state = '';
if (gasPriceWarnings && !gasPriceErrors) { if (gasPriceWarnings && !gasPriceErrors) {
state = 'warning'; state = 'warning';
} else if (gasPriceErrors) { }
if (gasPriceErrors) {
state = 'error'; state = 'error';
} }
return state; return state;