Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
2624789 committed Mar 25, 2024
1 parent 3b09a63 commit 1d9ec4e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/hooks/use-logout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const useLogout = () => {
await KeyStoreWrapper.removeIsBiometricsEnabled()
await KeyStoreWrapper.removePin()
await KeyStoreWrapper.removePinAttempts()
await KeyStoreWrapper.removeSecurePersitentState()
await KeyStoreWrapper.removeSecurePersistentState()

logLogout()
if (stateToDefault) {
Expand Down
4 changes: 2 additions & 2 deletions app/store/persistent-state/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ const PERSISTENT_STATE_KEY = "persistentState"

const loadPersistentState = async (): Promise<PersistentState> => {
const data = await loadJson(PERSISTENT_STATE_KEY)
const secureData = await KeyStoreWrapper.getSecurePersitentState()
const secureData = await KeyStoreWrapper.getSecurePersistentState()
return migrateAndGetPersistentState({ ...data, ...secureData })
}

const savePersistentState = async (state: PersistentState) => {
const { galoyAuthToken, ...data } = state
saveJson(PERSISTENT_STATE_KEY, data)
KeyStoreWrapper.setSecurePersitentState({ galoyAuthToken })
KeyStoreWrapper.setSecurePersistentState({ galoyAuthToken })
}

// TODO: should not be exported
Expand Down
6 changes: 3 additions & 3 deletions app/utils/storage/secureStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default class KeyStoreWrapper {
private static readonly PIN_ATTEMPTS = "pinAttempts"
private static readonly SECURE_STATE = "secureState"

public static async getSecurePersitentState(): Promise<
public static async getSecurePersistentState(): Promise<
SecurePersistentState | Record<string, never>
> {
try {
Expand All @@ -19,7 +19,7 @@ export default class KeyStoreWrapper {
}
}

public static async setSecurePersitentState(
public static async setSecurePersistentState(
state: SecurePersistentState,
): Promise<boolean> {
try {
Expand All @@ -32,7 +32,7 @@ export default class KeyStoreWrapper {
}
}

public static async removeSecurePersitentState(): Promise<boolean> {
public static async removeSecurePersistentState(): Promise<boolean> {
try {
await RNSecureKeyStore.remove(KeyStoreWrapper.SECURE_STATE)
return true
Expand Down

0 comments on commit 1d9ec4e

Please sign in to comment.