You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now we are using custom function that cleans ldk storage in bitkit:
exportconstwipeLdkStorage=async({
selectedWallet =getSelectedWallet(),
selectedNetwork =getSelectedNetwork(),}: {selectedWallet?: TWalletName;selectedNetwork?: EAvailableNetwork;}): Promise<Result<string>>=>{awaitldk.stop();constpath=`${RNFS.DocumentDirectoryPath}/ldk/${lm.account.name}`;constdeleteAllFiles=async(dirpath: string): Promise<void>=>{constitems=awaitRNFS.readDir(dirpath);for(constitemofitems){if(item.isFile()){awaitRNFS.unlink(item.path);}else{awaitdeleteAllFiles(item.path);}}};try{// delete all files in the directory// NOTE: this is a workaround for RNFS.unlink(folder) freezing the appawaitdeleteAllFiles(path);}catch(e){returnerr(e);}returnok(`${selectedNetwork}'s LDK directory wiped for ${selectedWallet}`);};
I think we should move this logic to native Kotlin/Swift code to make it more robust and handle corner cases, like LDK being running.
The text was updated successfully, but these errors were encountered:
Right now we are using custom function that cleans ldk storage in bitkit:
I think we should move this logic to native Kotlin/Swift code to make it more robust and handle corner cases, like LDK being running.
The text was updated successfully, but these errors were encountered: