diff --git a/.env.development.template b/.env.development.template index b04a17868..fae1a6993 100644 --- a/.env.development.template +++ b/.env.development.template @@ -12,7 +12,7 @@ BLOCKTANK_HOST=https://api.stag0.blocktank.to/blocktank/api/v2 DEFAULT_BITCOIN_NETWORK=bitcoin # Default Electrum Peer (Regtest) -ELECTRUM_REGTEST_HOST=34.65.86.104 +ELECTRUM_REGTEST_HOST=34.65.252.32 ELECTRUM_REGTEST_TCP_PORT=18483 ELECTRUM_REGTEST_SSL_PORT=18484 ELECTRUM_REGTEST_PROTO=tcp diff --git a/.env.production.template b/.env.production.template index a826f5c62..ef8f87356 100644 --- a/.env.production.template +++ b/.env.production.template @@ -12,7 +12,7 @@ BLOCKTANK_HOST=https://api1.blocktank.to/api DEFAULT_BITCOIN_NETWORK=bitcoin # Default Electrum Peer (Regtest) -ELECTRUM_REGTEST_HOST=34.65.86.104 +ELECTRUM_REGTEST_HOST=34.65.252.32 ELECTRUM_REGTEST_TCP_PORT=18483 ELECTRUM_REGTEST_SSL_PORT=18484 ELECTRUM_REGTEST_PROTO=tcp diff --git a/src/screens/Settings/DevSettings/LdkDebug.tsx b/src/screens/Settings/DevSettings/LdkDebug.tsx index 60ba7a896..e73a24063 100644 --- a/src/screens/Settings/DevSettings/LdkDebug.tsx +++ b/src/screens/Settings/DevSettings/LdkDebug.tsx @@ -2,10 +2,11 @@ import Clipboard from '@react-native-clipboard/clipboard'; import lm from '@synonymdev/react-native-ldk'; import React, { ReactElement, memo, useState } from 'react'; import { useTranslation } from 'react-i18next'; -import { ScrollView, StyleSheet } from 'react-native'; +import { ScrollView, StyleSheet, TouchableOpacity, View } from 'react-native'; import RNFS from 'react-native-fs'; import Share from 'react-native-share'; +import KeyboardAvoidingView from '../../../components/KeyboardAvoidingView'; import NavigationHeader from '../../../components/NavigationHeader'; import SafeAreaInset from '../../../components/SafeAreaInset'; import Button from '../../../components/buttons/Button'; @@ -13,17 +14,19 @@ import { useLightningBalance } from '../../../hooks/lightning'; import { useAppDispatch, useAppSelector } from '../../../hooks/redux'; import { useSheetRef } from '../../../sheets/SheetRefsProvider'; import { openChannelsSelector } from '../../../store/reselect/lightning'; +import { settingsSelector } from '../../../store/reselect/settings'; import { selectedNetworkSelector, selectedWalletSelector, } from '../../../store/reselect/wallet'; import { removeLightningPeer } from '../../../store/slices/lightning'; +import { updateSettings } from '../../../store/slices/settings'; import { createLightningInvoice, savePeer, } from '../../../store/utils/lightning'; import { TextInput, View as ThemedView } from '../../../styles/components'; -import { Caption13Up } from '../../../styles/text'; +import { BodyM, Caption13Up } from '../../../styles/text'; import { addPeer, getNodeId, @@ -53,6 +56,15 @@ const LdkDebug = (): ReactElement => { const selectedWallet = useAppSelector(selectedWalletSelector); const selectedNetwork = useAppSelector(selectedNetworkSelector); const openChannels = useAppSelector(openChannelsSelector); + const settings = useAppSelector(settingsSelector); + + // Max Dust HTLC Exposure form state + const [selectedType, setSelectedType] = useState< + 'fixed_limit' | 'fee_rate_multiplier' | null + >(settings?.max_dust_htlc_exposure_type ?? null); + const [exposureValue, setExposureValue] = useState( + settings?.max_dust_htlc_exposure?.toString() ?? '1000', + ); const onNodeId = async (): Promise => { const nodeId = await getNodeId(); @@ -316,127 +328,226 @@ const LdkDebug = (): ReactElement => { - - Add Peer - -