Skip to content

Commit

Permalink
fix: dont need anymore to clear http storage for ios (#583)
Browse files Browse the repository at this point in the history
  • Loading branch information
phoebus-84 authored Feb 17, 2025
1 parent e9731ca commit 3d03d8c
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 26 deletions.
22 changes: 0 additions & 22 deletions src/lib/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,3 @@ export function negativeFeedback(feedback: string, message?: string): Feedback {
};
}


export const clearHttpStorage = async () => {
try {
const result = await Filesystem.readdir({
path: 'HTTPStorages/com.didroom.wallet/',
directory: Directory.Library
});

const httpStorageFiles = result.files.filter((file) =>
file.name.includes('httpstorages.sqlite')
);

for (const file of httpStorageFiles) {
await Filesystem.deleteFile({
path: `HTTPStorages/com.didroom.wallet/${file.name}`,
directory: Directory.Library
});
}
} catch (error) {
log(String(error));
}
};
2 changes: 0 additions & 2 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@
import { gotoQrResult } from '$lib/components/organisms/scanner/tools';
import FingerPrint from '$lib/assets/lottieFingerPrint/FingerPrint.svelte';
import { m } from '$lib/i18n';
import { clearHttpStorage } from '$lib/utils';
import { Network } from '@capacitor/network';
import { debugPopup, debugPopupContent } from '$lib/components/organisms/debug/debug';
$: clearHttpStorage();
const controller = new AbortController();
const signal = controller.signal;
Expand Down
2 changes: 0 additions & 2 deletions src/routes/[[lang]]/(protected)/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import { goto, m, r } from '$lib/i18n';
import { onDestroy, onMount } from 'svelte';
import type { PluginListenerHandle } from '@capacitor/core';
import { clearHttpStorage } from '$lib/utils/index.js';
import { debugPopup } from '$lib/components/organisms/debug/debug.js';
export let data;
Expand All @@ -15,7 +14,6 @@
onMount(async () => {
appStateChange = await App.addListener('appStateChange', async (state) => {
await clearHttpStorage();
if (!state.isActive && !(r('/user-settings') === window.location.pathname)) {
debugPopup.set(false);
await goto('/unlock');
Expand Down

0 comments on commit 3d03d8c

Please sign in to comment.