Update electrumSettings.js

This commit is contained in:
Marcos Rodriguez Vélez 2021-08-26 21:45:50 -04:00
parent df51215cc2
commit 46ce262e5f

View file

@ -310,13 +310,14 @@ export default class ElectrumSettings extends Component {
(isTorCapable ? ' (' + loc.settings.tor_supported + ')' : '')
}
value={this.state.host}
onChangeText={text =>
this.setState({ host: text.trim() }, () => {
if (text.endsWith('.onion')) {
onChangeText={text => {
const host = text.trim();
this.setState({ host }, () => {
if (host.endsWith('.onion')) {
this.useSSLPortToggled(false);
}
})
}
});
}}
numberOfLines={1}
style={styles.inputText}
editable={!this.state.isLoading}