mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-21 14:34:55 +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
|
<TextInput
|
||||||
placeholder={loc.formatString(loc.settings.electrum_host, { example: '111.222.333.111' })}
|
placeholder={loc.formatString(loc.settings.electrum_host, { example: '111.222.333.111' })}
|
||||||
value={this.state.host}
|
value={this.state.host}
|
||||||
onChangeText={text => this.setState({ host: text })}
|
onChangeText={text => this.setState({ host: text.trim() })}
|
||||||
numberOfLines={1}
|
numberOfLines={1}
|
||||||
style={styles.inputText}
|
style={styles.inputText}
|
||||||
editable={!this.state.isLoading}
|
editable={!this.state.isLoading}
|
||||||
|
@ -187,7 +187,7 @@ export default class ElectrumSettings extends Component {
|
||||||
<TextInput
|
<TextInput
|
||||||
placeholder={loc.formatString(loc.settings.electrum_port, { example: '50001' })}
|
placeholder={loc.formatString(loc.settings.electrum_port, { example: '50001' })}
|
||||||
value={this.state.port}
|
value={this.state.port}
|
||||||
onChangeText={text => this.setState({ port: text })}
|
onChangeText={text => this.setState({ port: text.trim() })}
|
||||||
numberOfLines={1}
|
numberOfLines={1}
|
||||||
style={styles.inputText}
|
style={styles.inputText}
|
||||||
editable={!this.state.isLoading}
|
editable={!this.state.isLoading}
|
||||||
|
@ -200,7 +200,7 @@ export default class ElectrumSettings extends Component {
|
||||||
<TextInput
|
<TextInput
|
||||||
placeholder={loc.formatString(loc.settings.electrum_port_ssl, { example: '50002' })}
|
placeholder={loc.formatString(loc.settings.electrum_port_ssl, { example: '50002' })}
|
||||||
value={this.state.sslPort}
|
value={this.state.sslPort}
|
||||||
onChangeText={text => this.setState({ sslPort: text })}
|
onChangeText={text => this.setState({ sslPort: text.trim() })}
|
||||||
numberOfLines={1}
|
numberOfLines={1}
|
||||||
style={styles.inputText}
|
style={styles.inputText}
|
||||||
editable={!this.state.isLoading}
|
editable={!this.state.isLoading}
|
||||||
|
|
|
@ -59,6 +59,10 @@ const LightningSettings = () => {
|
||||||
.catch(() => setIsLoading(false));
|
.catch(() => setIsLoading(false));
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
const setLndhubURI = value => {
|
||||||
|
setURI(value.trim());
|
||||||
|
};
|
||||||
|
|
||||||
const save = useCallback(async () => {
|
const save = useCallback(async () => {
|
||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
try {
|
try {
|
||||||
|
@ -99,7 +103,7 @@ const LightningSettings = () => {
|
||||||
<TextInput
|
<TextInput
|
||||||
placeholder={LightningCustodianWallet.defaultBaseUri}
|
placeholder={LightningCustodianWallet.defaultBaseUri}
|
||||||
value={URI}
|
value={URI}
|
||||||
onChangeText={setURI}
|
onChangeText={setLndhubURI}
|
||||||
numberOfLines={1}
|
numberOfLines={1}
|
||||||
style={styles.uriText}
|
style={styles.uriText}
|
||||||
placeholderTextColor="#81868e"
|
placeholderTextColor="#81868e"
|
||||||
|
|
Loading…
Add table
Reference in a new issue