mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-22 23:08:07 +01:00
FIX: Disable toggle if server is for Tor
This commit is contained in:
parent
1cf90b8c3d
commit
df51215cc2
1 changed files with 13 additions and 2 deletions
|
@ -310,7 +310,13 @@ export default class ElectrumSettings extends Component {
|
|||
(isTorCapable ? ' (' + loc.settings.tor_supported + ')' : '')
|
||||
}
|
||||
value={this.state.host}
|
||||
onChangeText={text => this.setState({ host: text.trim() })}
|
||||
onChangeText={text =>
|
||||
this.setState({ host: text.trim() }, () => {
|
||||
if (text.endsWith('.onion')) {
|
||||
this.useSSLPortToggled(false);
|
||||
}
|
||||
})
|
||||
}
|
||||
numberOfLines={1}
|
||||
style={styles.inputText}
|
||||
editable={!this.state.isLoading}
|
||||
|
@ -354,7 +360,12 @@ export default class ElectrumSettings extends Component {
|
|||
/>
|
||||
</View>
|
||||
<BlueText style={styles.usePort}>{loc.settings.use_ssl}</BlueText>
|
||||
<Switch testID="SSLPortInput" value={this.state.sslPort?.trim() > 0} onValueChange={this.useSSLPortToggled} />
|
||||
<Switch
|
||||
testID="SSLPortInput"
|
||||
value={this.state.sslPort?.trim() > 0}
|
||||
onValueChange={this.useSSLPortToggled}
|
||||
disabled={this.state.host?.endsWith('.onion') ?? false}
|
||||
/>
|
||||
</View>
|
||||
<BlueSpacing20 />
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue