|
|
@ -43,6 +43,7 @@ class AddToken extends Component { |
|
|
|
customDecimalsError: null, |
|
|
|
customDecimalsError: null, |
|
|
|
autoFilled: false, |
|
|
|
autoFilled: false, |
|
|
|
displayedTab: SEARCH_TAB, |
|
|
|
displayedTab: SEARCH_TAB, |
|
|
|
|
|
|
|
forceEditSymbol: false, |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -225,6 +226,7 @@ class AddToken extends Component { |
|
|
|
customSymbolError, |
|
|
|
customSymbolError, |
|
|
|
customDecimalsError, |
|
|
|
customDecimalsError, |
|
|
|
autoFilled, |
|
|
|
autoFilled, |
|
|
|
|
|
|
|
forceEditSymbol, |
|
|
|
} = this.state |
|
|
|
} = this.state |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
@ -241,14 +243,28 @@ class AddToken extends Component { |
|
|
|
/> |
|
|
|
/> |
|
|
|
<TextField |
|
|
|
<TextField |
|
|
|
id="custom-symbol" |
|
|
|
id="custom-symbol" |
|
|
|
label={this.context.t('tokenSymbol')} |
|
|
|
label={( |
|
|
|
|
|
|
|
<div className="add-token__custom-symbol__label-wrapper"> |
|
|
|
|
|
|
|
<span className="add-token__custom-symbol__label"> |
|
|
|
|
|
|
|
{this.context.t('tokenSymbol')} |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
{(autoFilled && !forceEditSymbol) && ( |
|
|
|
|
|
|
|
<div |
|
|
|
|
|
|
|
className="add-token__custom-symbol__edit" |
|
|
|
|
|
|
|
onClick={() => this.setState({ forceEditSymbol: true })} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{this.context.t('edit')} |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
)} |
|
|
|
type="text" |
|
|
|
type="text" |
|
|
|
value={customSymbol} |
|
|
|
value={customSymbol} |
|
|
|
onChange={e => this.handleCustomSymbolChange(e.target.value)} |
|
|
|
onChange={e => this.handleCustomSymbolChange(e.target.value)} |
|
|
|
error={customSymbolError} |
|
|
|
error={customSymbolError} |
|
|
|
fullWidth |
|
|
|
fullWidth |
|
|
|
margin="normal" |
|
|
|
margin="normal" |
|
|
|
disabled={autoFilled} |
|
|
|
disabled={autoFilled && !forceEditSymbol} |
|
|
|
/> |
|
|
|
/> |
|
|
|
<TextField |
|
|
|
<TextField |
|
|
|
id="custom-decimals" |
|
|
|
id="custom-decimals" |
|
|
|