()
| 135 | type SelectFeeScreenRouteProp = RouteProp<SendDetailsStackParamList, 'SelectFee'>; |
| 136 | |
| 137 | const SelectFeeScreen = () => { |
| 138 | const navigation = useNavigation<SelectFeeScreenNavigationProp>(); |
| 139 | const route = useRoute<SelectFeeScreenRouteProp>(); |
| 140 | const { colors } = useTheme(); |
| 141 | const insets = useSafeAreaInsets(); |
| 142 | |
| 143 | const { networkTransactionFees, feePrecalc, feeRate, feeUnit = BitcoinUnit.BTC, walletID, customFee } = route.params; |
| 144 | |
| 145 | const [state, dispatch] = useReducer(feeScreenReducer, { |
| 146 | customFeeValue: customFee || '', |
| 147 | isCustomFeeFocused: false, |
| 148 | options: [], |
| 149 | isCustomFeeSelected: false, |
| 150 | }); |
| 151 | |
| 152 | const customFeeInputRef = useRef<TextInput>(null); |
| 153 | const nf = networkTransactionFees; |
| 154 | |
| 155 | const stylesHook = StyleSheet.create({ |
| 156 | keyboardAvoidingRoot: { |
| 157 | backgroundColor: colors.elevated, |
| 158 | }, |
| 159 | scrollView: { |
| 160 | backgroundColor: colors.elevated, |
| 161 | }, |
| 162 | container: { |
| 163 | backgroundColor: colors.elevated, |
| 164 | paddingHorizontal: 16, |
| 165 | paddingTop: 12, |
| 166 | paddingBottom: Math.max(insets.bottom, 48) + 16, |
| 167 | }, |
| 168 | feeModalItemActiveBackground: { |
| 169 | backgroundColor: colors.feeActive, |
| 170 | }, |
| 171 | customLabelColor: { |
| 172 | color: colors.successColor, |
| 173 | }, |
| 174 | satVbyteText: { |
| 175 | color: colors.successColor, |
| 176 | }, |
| 177 | customFeeInputColors: { |
| 178 | color: colors.successColor, |
| 179 | borderColor: colors.formBorder, |
| 180 | }, |
| 181 | feeTimeBackground: { |
| 182 | backgroundColor: colors.successColor, |
| 183 | }, |
| 184 | feeTimeBackgroundDisabled: { |
| 185 | backgroundColor: colors.buttonDisabledBackgroundColor, |
| 186 | }, |
| 187 | feeTimeText: { |
| 188 | color: colors.background, |
| 189 | }, |
| 190 | }); |
| 191 | |
| 192 | const formatFee = useCallback((fee: number) => formatBalance(fee, feeUnit, true), [feeUnit]); |
| 193 | |
| 194 | useEffect(() => { |
nothing calls this directly
no test coverage detected