mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-20 14:05:27 +01:00
FiX: Settings|Network|Lightning Settings fails input for leading or trailing blank #1524
This commit is contained in:
parent
79bd72bd38
commit
7e48d34b4b
2 changed files with 8 additions and 4 deletions
|
@ -174,7 +174,7 @@ export default class ElectrumSettings extends Component {
|
|||
<TextInput
|
||||
placeholder={loc.formatString(loc.settings.electrum_host, { example: '111.222.333.111' })}
|
||||
value={this.state.host}
|
||||
onChangeText={text => this.setState({ host: text })}
|
||||
onChangeText={text => this.setState({ host: text.trim() })}
|
||||
numberOfLines={1}
|
||||
style={styles.inputText}
|
||||
editable={!this.state.isLoading}
|
||||
|
@ -187,7 +187,7 @@ export default class ElectrumSettings extends Component {
|
|||
<TextInput
|
||||
placeholder={loc.formatString(loc.settings.electrum_port, { example: '50001' })}
|
||||
value={this.state.port}
|
||||
onChangeText={text => this.setState({ port: text })}
|
||||
onChangeText={text => this.setState({ port: text.trim() })}
|
||||
numberOfLines={1}
|
||||
style={styles.inputText}
|
||||
editable={!this.state.isLoading}
|
||||
|
@ -200,7 +200,7 @@ export default class ElectrumSettings extends Component {
|
|||
<TextInput
|
||||
placeholder={loc.formatString(loc.settings.electrum_port_ssl, { example: '50002' })}
|
||||
value={this.state.sslPort}
|
||||
onChangeText={text => this.setState({ sslPort: text })}
|
||||
onChangeText={text => this.setState({ sslPort: text.trim() })}
|
||||
numberOfLines={1}
|
||||
style={styles.inputText}
|
||||
editable={!this.state.isLoading}
|
||||
|
|
|
@ -59,6 +59,10 @@ const LightningSettings = () => {
|
|||
.catch(() => setIsLoading(false));
|
||||
}, []);
|
||||
|
||||
const setLndhubURI = value => {
|
||||
setURI(value.trim());
|
||||
};
|
||||
|
||||
const save = useCallback(async () => {
|
||||
setIsLoading(true);
|
||||
try {
|
||||
|
@ -99,7 +103,7 @@ const LightningSettings = () => {
|
|||
<TextInput
|
||||
placeholder={LightningCustodianWallet.defaultBaseUri}
|
||||
value={URI}
|
||||
onChangeText={setURI}
|
||||
onChangeText={setLndhubURI}
|
||||
numberOfLines={1}
|
||||
style={styles.uriText}
|
||||
placeholderTextColor="#81868e"
|
||||
|
|
Loading…
Add table
Reference in a new issue