mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-08-02 03:26:23 -04:00
fix(gui): Lazy load tauri store
This commit is contained in:
parent
253e0b0cf6
commit
e6dc7ddcef
1 changed files with 4 additions and 4 deletions
|
@ -18,7 +18,7 @@ const rootPersistConfig = {
|
|||
};
|
||||
|
||||
// Use Tauri's store plugin for persistent settings
|
||||
const tauriStore = await createStore(`${getNetworkName()}_settings.bin`, {
|
||||
const tauriStore = createStore(`${getNetworkName()}_settings.bin`, {
|
||||
autoSave: 1000 as unknown as boolean,
|
||||
});
|
||||
|
||||
|
@ -26,9 +26,9 @@ const tauriStore = await createStore(`${getNetworkName()}_settings.bin`, {
|
|||
const settingsPersistConfig = {
|
||||
key: "settings",
|
||||
storage: {
|
||||
getItem: (key: string) => tauriStore.get(key),
|
||||
setItem: (key: string, value: unknown) => tauriStore.set(key, value),
|
||||
removeItem: (key: string) => tauriStore.delete(key),
|
||||
getItem: async (key: string) => (await tauriStore).get(key),
|
||||
setItem: async (key: string, value: unknown) => (await tauriStore).set(key, value),
|
||||
removeItem: async (key: string) => (await tauriStore).delete(key),
|
||||
},
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue