@@ -3,7 +3,6 @@ import { useTranslation } from 'react-i18next';
33import RNFS , { unlink , writeFile } from 'react-native-fs' ;
44import Share from 'react-native-share' ;
55
6- import Dialog from '../../../components/Dialog' ;
76import { EItemType , IListData } from '../../../components/List' ;
87import { __E2E__ } from '../../../constants/env' ;
98import { useAppDispatch , useAppSelector } from '../../../hooks/redux' ;
@@ -42,8 +41,6 @@ import {
4241} from '../../../store/slices/wallet' ;
4342import { resetWidgetsState } from '../../../store/slices/widgets' ;
4443import { wipeApp } from '../../../store/utils/settings' ;
45- import { zipLogs } from '../../../utils/lightning/logs' ;
46- import { showToast } from '../../../utils/notifications' ;
4744import { refreshWallet } from '../../../utils/wallet' ;
4845import { runChecks } from '../../../utils/wallet/checks' ;
4946import { getFakeTransaction } from '../../../utils/wallet/testing' ;
@@ -54,7 +51,6 @@ const DevSettings = ({
5451} : SettingsScreenProps < 'DevSettings' > ) : ReactElement => {
5552 const dispatch = useAppDispatch ( ) ;
5653 const { t } = useTranslation ( 'lightning' ) ;
57- const [ showDialog , setShowDialog ] = useState ( false ) ;
5854 const [ throwError , setThrowError ] = useState ( false ) ;
5955 const selectedWallet = useAppSelector ( selectedWalletSelector ) ;
6056 const selectedNetwork = useAppSelector ( selectedNetworkSelector ) ;
@@ -71,30 +67,6 @@ const DevSettings = ({
7167 } ) ;
7268 } ;
7369
74- const exportLdkLogs = async ( ) : Promise < void > => {
75- const result = await zipLogs ( {
76- includeJson : true ,
77- includeBinaries : true ,
78- } ) ;
79- if ( result . isErr ( ) ) {
80- showToast ( {
81- type : 'warning' ,
82- title : t ( 'error_logs' ) ,
83- description : t ( 'error_logs_description' ) ,
84- } ) ;
85- return ;
86- }
87-
88- // Share the zip file
89- await Share . open ( {
90- type : 'application/zip' ,
91- url : `file://${ result . value } ` ,
92- title : t ( 'export_logs' ) ,
93- } ) ;
94-
95- setShowDialog ( false ) ;
96- } ;
97-
9870 const exportStore = async ( ) : Promise < void > => {
9971 const time = new Date ( ) . getTime ( ) ;
10072 const store = JSON . stringify ( getStore ( ) , null , 2 ) ;
@@ -182,11 +154,6 @@ const DevSettings = ({
182154 type : EItemType . button ,
183155 onPress : clearUtxos ,
184156 } ,
185- {
186- title : 'Export LDK Logs' ,
187- type : EItemType . button ,
188- onPress : ( ) => setShowDialog ( true ) ,
189- } ,
190157 {
191158 title : 'Export Store' ,
192159 type : EItemType . button ,
@@ -350,19 +317,7 @@ const DevSettings = ({
350317 throw new Error ( 'test render error' ) ;
351318 }
352319
353- return (
354- < >
355- < SettingsView title = "Dev Settings" listData = { settingsListData } />
356- < Dialog
357- visible = { showDialog }
358- title = "Export sensitive logs?"
359- description = "This export contains sensitive data and gives control over your Lightning funds. Do you want to continue?"
360- cancelText = "Cancel"
361- onCancel = { ( ) : void => setShowDialog ( false ) }
362- onConfirm = { exportLdkLogs }
363- />
364- </ >
365- ) ;
320+ return < SettingsView title = "Dev Settings" listData = { settingsListData } /> ;
366321} ;
367322
368323export default memo ( DevSettings ) ;
0 commit comments