fix logout function, prepare for multi-account support

This commit is contained in:
Ren Amamiya
2023-09-08 08:36:15 +07:00
parent 472925bb05
commit a1fa777f8c
12 changed files with 119 additions and 112 deletions

View File

@@ -4,6 +4,7 @@ import { createJSONStorage, persist } from 'zustand/middleware';
interface StrongholdState {
privkey: null | string;
setPrivkey: (privkey: string) => void;
clearPrivkey: () => void;
}
export const useStronghold = create<StrongholdState>()(
@@ -13,6 +14,9 @@ export const useStronghold = create<StrongholdState>()(
setPrivkey: (privkey: string) => {
set({ privkey: privkey });
},
clearPrivkey: () => {
set({ privkey: null });
},
}),
{
name: 'stronghold',