mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-21 14:34:55 +01:00
FIX: If slider value < 1, force it to 1.
This commit is contained in:
parent
2cb56b51e9
commit
a2ed103cef
3 changed files with 14 additions and 6 deletions
|
@ -67,4 +67,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
|
|||
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
|
||||
|
||||
[version]
|
||||
^0.85.0
|
||||
^0.86.0
|
||||
|
|
|
@ -392,7 +392,12 @@ export default class SendDetails extends Component {
|
|||
<Modal
|
||||
isVisible={this.state.isFeeSelectionModalVisible}
|
||||
style={styles.bottomModal}
|
||||
onBackdropPress={() => this.setState({ isFeeSelectionModalVisible: false })}
|
||||
onBackdropPress={() => {
|
||||
if (this.state.fee < 1 || this.state.feeSliderValue < 1) {
|
||||
this.setState({ fee: Number(1), feeSliderValue: Number(1) });
|
||||
}
|
||||
this.setState({ isFeeSelectionModalVisible: false });
|
||||
}}
|
||||
>
|
||||
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null}>
|
||||
<View style={styles.modalContent}>
|
||||
|
@ -403,12 +408,14 @@ export default class SendDetails extends Component {
|
|||
this.textInput = ref;
|
||||
}}
|
||||
value={this.state.fee.toString()}
|
||||
onEndEditing={() => {
|
||||
if (this.state.fee < 1 || this.state.feeSliderValue < 1) {
|
||||
this.setState({ fee: Number(1), feeSliderValue: Number(1) });
|
||||
}
|
||||
}}
|
||||
onChangeText={value => {
|
||||
let newValue = value.replace(/\D/g, '');
|
||||
if (newValue.length === 0) {
|
||||
newValue = 1;
|
||||
}
|
||||
this.setState({ fee: newValue, feeSliderValue: newValue });
|
||||
this.setState({ fee: Number(newValue), feeSliderValue: Number(newValue) });
|
||||
}}
|
||||
maxLength={9}
|
||||
editable={!this.state.isLoading}
|
||||
|
|
|
@ -98,6 +98,7 @@ export default class WalletsAdd extends Component {
|
|||
onChangeText={text => {
|
||||
this.setLabel(text);
|
||||
}}
|
||||
autoFocus
|
||||
style={{ flex: 1, marginHorizontal: 8, color: '#81868e' }}
|
||||
editable={!this.state.isLoading}
|
||||
underlineColorAndroid="transparent"
|
||||
|
|
Loading…
Add table
Reference in a new issue