Skip to content

Commit

Permalink
[DDW-178] Autocomplete error adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
thedanheller committed Jul 6, 2020
1 parent b2dfa4d commit f69bed4
Showing 1 changed file with 7 additions and 5 deletions.
Expand Up @@ -258,14 +258,18 @@ export default class Step1ConfigurationDialog extends Component<Props> {
suggestedMnemonics,
openExternalLink,
wallets,
error,
error: serverError,
} = this.props;
const recoveryPhraseField = form.$('recoveryPhrase');
const walletsDropdownField = form.$('walletsDropdown');
const checkboxAcceptance1Field = form.$('checkboxAcceptance1');
const checkboxAcceptance2Field = form.$('checkboxAcceptance2');
const walletId = get(wallet, 'id', null);

let error;
if (serverError) error = intl.formatMessage(serverError);
else if (recoveryPhraseField.error) error = recoveryPhraseField.error;

const buttonClasses = classnames([
'primary',
isSubmitting ? styles.isSubmitting : null,
Expand Down Expand Up @@ -335,7 +339,7 @@ export default class Step1ConfigurationDialog extends Component<Props> {
}}
options={suggestedMnemonics}
maxSelections={WALLET_RECOVERY_PHRASE_WORD_COUNT}
error={recoveryPhraseField.error}
error={recoveryPhraseField.error ? ' ' : null}
maxVisibleOptions={5}
noResultsMessage={intl.formatMessage(messages.noResults)}
className={styles.recoveryPhrase}
Expand Down Expand Up @@ -368,9 +372,7 @@ export default class Step1ConfigurationDialog extends Component<Props> {
skin={CheckboxSkin}
error={checkboxAcceptance2Field.error}
/>
{error && (
<p className={styles.error}>{intl.formatMessage(error)}</p>
)}
{error && <p className={styles.error}>{error}</p>}
</div>
</Dialog>
</>
Expand Down

0 comments on commit f69bed4

Please sign in to comment.