Skip to content

Commit

Permalink
OnchainFeeInput: ensure fee rate is set properly when suggestions dis…
Browse files Browse the repository at this point in the history
…abled
  • Loading branch information
kaloudis committed Oct 26, 2024
1 parent 943c59c commit de76c34
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion components/OnchainFeeInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ interface OnchainFeeInputProps {
onChangeFee: (fee: string) => void;
}

const DEFAULT_FEE = '10';

export default function OnchainFeeInput(props: OnchainFeeInputProps) {
const { fee, onChangeFee, navigation } = props;

Expand Down Expand Up @@ -45,6 +47,8 @@ export default function OnchainFeeInput(props: OnchainFeeInputProps) {
setErrorOccurredLoadingFees(true);
setLoading(false);
});
} else {
onChangeFee(DEFAULT_FEE);
}
}, []);

Expand Down Expand Up @@ -97,7 +101,7 @@ export default function OnchainFeeInput(props: OnchainFeeInputProps) {
) : (
<TextInput
keyboardType="numeric"
placeholder="2"
placeholder={DEFAULT_FEE}
value={newFee}
onChangeText={(text: string) => {
setNewFee(text);
Expand Down

0 comments on commit de76c34

Please sign in to comment.