Skip to content

Commit

Permalink
fix: resolve jest issues
Browse files Browse the repository at this point in the history
  • Loading branch information
JMoises-XCode committed Feb 27, 2025
1 parent 52dbbc9 commit ceb6bc8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
5 changes: 2 additions & 3 deletions app/hooks/use-app-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useCallback, useMemo } from "react"

import { GaloyInstance, resolveGaloyInstanceOrDefault } from "@app/config"
import { usePersistentStateContext } from "@app/store/persistent-state"
import KeyStoreWrapper from "../utils/storage/secureStorage"
import KeyStoreWrapper from "@app/utils/storage/secureStorage"

export const useAppConfig = () => {
const { persistentState, updateState } = usePersistentStateContext()
Expand Down Expand Up @@ -60,9 +60,8 @@ export const useAppConfig = () => {
[updateState],
)

const setAllToken = async (token: string): Promise<string> => {
const setAllToken = async (token: string) => {
await KeyStoreWrapper.setAllTokens(token)
return token
}

return {
Expand Down
2 changes: 1 addition & 1 deletion app/screens/settings-screen/account/settings/logout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { StackNavigationProp } from "@react-navigation/stack"

import { SettingsButton } from "../../button"
import { useLoginMethods } from "../login-methods-hook"
import KeyStoreWrapper from "../../../../utils/storage/secureStorage"
import KeyStoreWrapper from "@app/utils/storage/secureStorage"

export const LogOut = () => {
const navigation = useNavigation<StackNavigationProp<RootStackParamList>>()
Expand Down
4 changes: 2 additions & 2 deletions app/screens/settings-screen/settings/switch-account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
useUsernameLazyQuery,
} from "@app/graphql/generated"
import { useApolloClient, gql } from "@apollo/client"
import KeyStoreWrapper from "../../../utils/storage/secureStorage"
import KeyStoreWrapper from "@app/utils/storage/secureStorage"
import { logLogout } from "@app/utils/analytics"
import crashlytics from "@react-native-firebase/crashlytics"

Expand Down Expand Up @@ -71,7 +71,7 @@ export const SwitchAccount: React.FC = () => {
let allTokens = (await KeyStoreWrapper.getAllTokens()).reverse()
let counter = 1

// Support old session
// Add session token if not exist
if (allTokens.length <= 0 && curToken) {
await KeyStoreWrapper.setAllTokens(curToken)
allTokens = [curToken]
Expand Down
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ module.exports = {
"|@react-native" +
"|@react-navigation" +
"|react-native-animatable" +
"|react-native-secure-key-store" +
"|react-native-country-picker-modal" +
"|react-native-error-boundary" +
"|react-native-extended-stylesheet" +
Expand Down

0 comments on commit ceb6bc8

Please sign in to comment.