@oxyhq/services 5.16.44 → 5.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -10
- package/lib/commonjs/core/OxyServices.js +1 -1
- package/lib/commonjs/core/index.js +20 -15
- package/lib/commonjs/core/index.js.map +1 -1
- package/lib/commonjs/core/mixins/OxyServices.auth.js +36 -53
- package/lib/commonjs/core/mixins/OxyServices.auth.js.map +1 -1
- package/lib/commonjs/core/mixins/OxyServices.user.js +10 -17
- package/lib/commonjs/core/mixins/OxyServices.user.js.map +1 -1
- package/lib/commonjs/core/services/TokenService.js +27 -13
- package/lib/commonjs/core/services/TokenService.js.map +1 -1
- package/lib/commonjs/crypto/index.js +0 -16
- package/lib/commonjs/crypto/index.js.map +1 -1
- package/lib/commonjs/crypto/keyManager.js +21 -22
- package/lib/commonjs/crypto/keyManager.js.map +1 -1
- package/lib/commonjs/crypto/polyfill.js +1 -10
- package/lib/commonjs/crypto/polyfill.js.map +1 -1
- package/lib/commonjs/crypto/signatureService.js +18 -32
- package/lib/commonjs/crypto/signatureService.js.map +1 -1
- package/lib/commonjs/index.js +13 -134
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/models/interfaces.js +0 -7
- package/lib/commonjs/models/interfaces.js.map +1 -1
- package/lib/commonjs/node/index.js +1 -10
- package/lib/commonjs/node/index.js.map +1 -1
- package/lib/commonjs/ui/components/BottomSheetRouter.js +1 -9
- package/lib/commonjs/ui/components/BottomSheetRouter.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +9 -20
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +779 -450
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js +551 -0
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -0
- package/lib/commonjs/ui/context/hooks/useDeviceManagement.js +73 -0
- package/lib/commonjs/ui/context/hooks/useDeviceManagement.js.map +1 -0
- package/lib/commonjs/ui/context/hooks/useStorage.js +79 -0
- package/lib/commonjs/ui/context/hooks/useStorage.js.map +1 -0
- package/lib/commonjs/ui/hooks/index.js +0 -20
- package/lib/commonjs/ui/hooks/index.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/index.js +0 -12
- package/lib/commonjs/ui/hooks/mutations/index.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +23 -74
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/index.js +0 -12
- package/lib/commonjs/ui/hooks/queries/index.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/queryKeys.js +1 -3
- package/lib/commonjs/ui/hooks/queries/queryKeys.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useAccountQueries.js +28 -64
- package/lib/commonjs/ui/hooks/queries/useAccountQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useServicesQueries.js +6 -4
- package/lib/commonjs/ui/hooks/queries/useServicesQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/useDeviceManagement.js +73 -0
- package/lib/commonjs/ui/hooks/useDeviceManagement.js.map +1 -0
- package/lib/commonjs/ui/hooks/useProfileEditing.js +5 -3
- package/lib/commonjs/ui/hooks/useProfileEditing.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSessionManagement.js +284 -0
- package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -0
- package/lib/commonjs/ui/index.js +2 -10
- package/lib/commonjs/ui/index.js.map +1 -1
- package/lib/commonjs/ui/navigation/routes.js +1 -5
- package/lib/commonjs/ui/navigation/routes.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +4 -9
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +19 -37
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +5 -5
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/OxyAuthScreen.js +15 -2
- package/lib/commonjs/ui/screens/OxyAuthScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +97 -76
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +6 -6
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/stores/authStore.js +6 -54
- package/lib/commonjs/ui/stores/authStore.js.map +1 -1
- package/lib/commonjs/ui/styles/spacing.js +2 -54
- package/lib/commonjs/ui/styles/spacing.js.map +1 -1
- package/lib/commonjs/ui/utils/avatarUtils.js +12 -9
- package/lib/commonjs/ui/utils/avatarUtils.js.map +1 -1
- package/lib/commonjs/ui/utils/sessionHelpers.js +1 -7
- package/lib/commonjs/ui/utils/sessionHelpers.js.map +1 -1
- package/lib/commonjs/utils/deviceManager.js +177 -0
- package/lib/commonjs/utils/deviceManager.js.map +1 -0
- package/lib/commonjs/utils/errorUtils.js +0 -13
- package/lib/commonjs/utils/errorUtils.js.map +1 -1
- package/lib/commonjs/utils/index.js +7 -0
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/commonjs/utils/sessionUtils.js +1 -8
- package/lib/commonjs/utils/sessionUtils.js.map +1 -1
- package/lib/commonjs/utils/validationUtils.js +1 -15
- package/lib/commonjs/utils/validationUtils.js.map +1 -1
- package/lib/module/core/OxyServices.js +1 -1
- package/lib/module/core/index.js +4 -6
- package/lib/module/core/index.js.map +1 -1
- package/lib/module/core/mixins/OxyServices.auth.js +36 -53
- package/lib/module/core/mixins/OxyServices.auth.js.map +1 -1
- package/lib/module/core/mixins/OxyServices.user.js +10 -17
- package/lib/module/core/mixins/OxyServices.user.js.map +1 -1
- package/lib/module/core/services/TokenService.js +27 -13
- package/lib/module/core/services/TokenService.js.map +1 -1
- package/lib/module/crypto/index.js +0 -3
- package/lib/module/crypto/index.js.map +1 -1
- package/lib/module/crypto/keyManager.js +21 -22
- package/lib/module/crypto/keyManager.js.map +1 -1
- package/lib/module/crypto/polyfill.js +1 -2
- package/lib/module/crypto/polyfill.js.map +1 -1
- package/lib/module/crypto/signatureService.js +18 -32
- package/lib/module/crypto/signatureService.js.map +1 -1
- package/lib/module/index.js +7 -19
- package/lib/module/index.js.map +1 -1
- package/lib/module/models/interfaces.js +0 -7
- package/lib/module/models/interfaces.js.map +1 -1
- package/lib/module/node/index.js +0 -3
- package/lib/module/node/index.js.map +1 -1
- package/lib/module/ui/components/BottomSheetRouter.js +2 -6
- package/lib/module/ui/components/BottomSheetRouter.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +9 -20
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +779 -450
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/hooks/useAuthOperations.js +545 -0
- package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -0
- package/lib/module/ui/context/hooks/useDeviceManagement.js +68 -0
- package/lib/module/ui/context/hooks/useDeviceManagement.js.map +1 -0
- package/lib/module/ui/context/hooks/useStorage.js +74 -0
- package/lib/module/ui/context/hooks/useStorage.js.map +1 -0
- package/lib/module/ui/hooks/index.js +0 -1
- package/lib/module/ui/hooks/index.js.map +1 -1
- package/lib/module/ui/hooks/mutations/index.js +1 -1
- package/lib/module/ui/hooks/mutations/index.js.map +1 -1
- package/lib/module/ui/hooks/mutations/useAccountMutations.js +21 -71
- package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/module/ui/hooks/queries/index.js +1 -1
- package/lib/module/ui/hooks/queries/index.js.map +1 -1
- package/lib/module/ui/hooks/queries/queryKeys.js +1 -3
- package/lib/module/ui/hooks/queries/queryKeys.js.map +1 -1
- package/lib/module/ui/hooks/queries/useAccountQueries.js +27 -61
- package/lib/module/ui/hooks/queries/useAccountQueries.js.map +1 -1
- package/lib/module/ui/hooks/queries/useServicesQueries.js +6 -4
- package/lib/module/ui/hooks/queries/useServicesQueries.js.map +1 -1
- package/lib/module/ui/hooks/useDeviceManagement.js +68 -0
- package/lib/module/ui/hooks/useDeviceManagement.js.map +1 -0
- package/lib/module/ui/hooks/useProfileEditing.js +5 -3
- package/lib/module/ui/hooks/useProfileEditing.js.map +1 -1
- package/lib/module/ui/hooks/useSessionManagement.js +279 -0
- package/lib/module/ui/hooks/useSessionManagement.js.map +1 -0
- package/lib/module/ui/index.js +1 -2
- package/lib/module/ui/index.js.map +1 -1
- package/lib/module/ui/navigation/routes.js +1 -5
- package/lib/module/ui/navigation/routes.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +4 -9
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +19 -37
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +5 -5
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/module/ui/screens/OxyAuthScreen.js +15 -2
- package/lib/module/ui/screens/OxyAuthScreen.js.map +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js +98 -77
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +6 -6
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/stores/authStore.js +6 -54
- package/lib/module/ui/stores/authStore.js.map +1 -1
- package/lib/module/ui/styles/spacing.js +2 -6
- package/lib/module/ui/styles/spacing.js.map +1 -1
- package/lib/module/ui/utils/avatarUtils.js +12 -9
- package/lib/module/ui/utils/avatarUtils.js.map +1 -1
- package/lib/module/ui/utils/sessionHelpers.js +1 -7
- package/lib/module/ui/utils/sessionHelpers.js.map +1 -1
- package/lib/module/utils/deviceManager.js +171 -0
- package/lib/module/utils/deviceManager.js.map +1 -0
- package/lib/module/utils/errorUtils.js +0 -7
- package/lib/module/utils/errorUtils.js.map +1 -1
- package/lib/module/utils/index.js +1 -2
- package/lib/module/utils/index.js.map +1 -1
- package/lib/module/utils/sessionUtils.js +1 -8
- package/lib/module/utils/sessionUtils.js.map +1 -1
- package/lib/module/utils/validationUtils.js +0 -13
- package/lib/module/utils/validationUtils.js.map +1 -1
- package/lib/typescript/core/OxyServices.d.ts +1 -1
- package/lib/typescript/core/index.d.ts +3 -3
- package/lib/typescript/core/index.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.auth.d.ts +21 -44
- package/lib/typescript/core/mixins/OxyServices.auth.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.user.d.ts +1 -0
- package/lib/typescript/core/mixins/OxyServices.user.d.ts.map +1 -1
- package/lib/typescript/core/mixins/index.d.ts +8 -15
- package/lib/typescript/core/mixins/index.d.ts.map +1 -1
- package/lib/typescript/core/services/TokenService.d.ts.map +1 -1
- package/lib/typescript/crypto/index.d.ts +0 -1
- package/lib/typescript/crypto/index.d.ts.map +1 -1
- package/lib/typescript/crypto/keyManager.d.ts +2 -15
- package/lib/typescript/crypto/keyManager.d.ts.map +1 -1
- package/lib/typescript/crypto/polyfill.d.ts +1 -2
- package/lib/typescript/crypto/polyfill.d.ts.map +1 -1
- package/lib/typescript/crypto/signatureService.d.ts +0 -13
- package/lib/typescript/crypto/signatureService.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +7 -12
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/models/interfaces.d.ts +36 -5
- package/lib/typescript/models/interfaces.d.ts.map +1 -1
- package/lib/typescript/models/session.d.ts +18 -3
- package/lib/typescript/models/session.d.ts.map +1 -1
- package/lib/typescript/node/index.d.ts +0 -1
- package/lib/typescript/node/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/BottomSheetRouter.d.ts +0 -5
- package/lib/typescript/ui/components/BottomSheetRouter.d.ts.map +1 -1
- package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/ui/components/TextField/Addons/Outline.d.ts +2 -2
- package/lib/typescript/ui/components/TextField/helpers.d.ts +2 -2
- package/lib/typescript/ui/components/TextField/types.d.ts +0 -1
- package/lib/typescript/ui/components/TextField/types.d.ts.map +1 -1
- package/lib/typescript/ui/context/OxyContext.d.ts +28 -5
- package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/ui/context/hooks/useAuthOperations.d.ts +59 -0
- package/lib/typescript/ui/context/hooks/useAuthOperations.d.ts.map +1 -0
- package/lib/typescript/ui/context/hooks/useDeviceManagement.d.ts +27 -0
- package/lib/typescript/ui/context/hooks/useDeviceManagement.d.ts.map +1 -0
- package/lib/typescript/ui/context/hooks/useStorage.d.ts +22 -0
- package/lib/typescript/ui/context/hooks/useStorage.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/index.d.ts +0 -1
- package/lib/typescript/ui/hooks/index.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/mutations/index.d.ts +1 -1
- package/lib/typescript/ui/hooks/mutations/index.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/mutations/useAccountMutations.d.ts +8 -19
- package/lib/typescript/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/mutations/useServicesMutations.d.ts +1 -1
- package/lib/typescript/ui/hooks/mutations/useServicesMutations.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/queries/index.d.ts +1 -1
- package/lib/typescript/ui/hooks/queries/index.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/queries/queryKeys.d.ts +0 -2
- package/lib/typescript/ui/hooks/queries/queryKeys.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/queries/useAccountQueries.d.ts +5 -17
- package/lib/typescript/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useDeviceManagement.d.ts +27 -0
- package/lib/typescript/ui/hooks/useDeviceManagement.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/useProfileEditing.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useSessionManagement.d.ts +41 -0
- package/lib/typescript/ui/hooks/useSessionManagement.d.ts.map +1 -0
- package/lib/typescript/ui/index.d.ts +0 -1
- package/lib/typescript/ui/index.d.ts.map +1 -1
- package/lib/typescript/ui/navigation/routes.d.ts +1 -1
- package/lib/typescript/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/OxyAuthScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/stores/authStore.d.ts +1 -8
- package/lib/typescript/ui/stores/authStore.d.ts.map +1 -1
- package/lib/typescript/ui/styles/spacing.d.ts +0 -5
- package/lib/typescript/ui/styles/spacing.d.ts.map +1 -1
- package/lib/typescript/ui/utils/avatarUtils.d.ts +4 -1
- package/lib/typescript/ui/utils/avatarUtils.d.ts.map +1 -1
- package/lib/typescript/ui/utils/sessionHelpers.d.ts +0 -1
- package/lib/typescript/ui/utils/sessionHelpers.d.ts.map +1 -1
- package/lib/typescript/utils/deviceManager.d.ts +66 -0
- package/lib/typescript/utils/deviceManager.d.ts.map +1 -0
- package/lib/typescript/utils/errorUtils.d.ts +0 -6
- package/lib/typescript/utils/errorUtils.d.ts.map +1 -1
- package/lib/typescript/utils/index.d.ts +2 -0
- package/lib/typescript/utils/index.d.ts.map +1 -1
- package/lib/typescript/utils/sessionUtils.d.ts.map +1 -1
- package/lib/typescript/utils/validationUtils.d.ts +0 -8
- package/lib/typescript/utils/validationUtils.d.ts.map +1 -1
- package/package.json +1 -6
- package/src/core/OxyServices.ts +1 -1
- package/src/core/index.ts +5 -8
- package/src/core/mixins/OxyServices.auth.ts +44 -87
- package/src/core/mixins/OxyServices.user.ts +10 -18
- package/src/core/services/TokenService.ts +27 -16
- package/src/crypto/index.ts +1 -3
- package/src/crypto/keyManager.ts +21 -30
- package/src/crypto/polyfill.ts +1 -2
- package/src/crypto/signatureService.ts +19 -43
- package/src/index.ts +6 -41
- package/src/models/interfaces.ts +39 -12
- package/src/models/session.ts +19 -7
- package/src/node/index.ts +0 -3
- package/src/ui/components/BottomSheetRouter.tsx +1 -6
- package/src/ui/components/OxyProvider.tsx +10 -17
- package/src/ui/components/TextField/Addons/Outline.tsx +2 -2
- package/src/ui/components/TextField/helpers.tsx +2 -2
- package/src/ui/components/TextField/types.tsx +1 -1
- package/src/ui/context/OxyContext.tsx +831 -463
- package/src/ui/context/hooks/useAuthOperations.ts +620 -0
- package/src/ui/context/hooks/useDeviceManagement.ts +108 -0
- package/src/ui/context/hooks/useStorage.ts +104 -0
- package/src/ui/hooks/index.ts +1 -2
- package/src/ui/hooks/mutations/index.ts +0 -2
- package/src/ui/hooks/mutations/useAccountMutations.ts +20 -66
- package/src/ui/hooks/queries/index.ts +0 -2
- package/src/ui/hooks/queries/queryKeys.ts +0 -2
- package/src/ui/hooks/queries/useAccountQueries.ts +19 -53
- package/src/ui/hooks/queries/useServicesQueries.ts +5 -5
- package/src/ui/hooks/useDeviceManagement.ts +108 -0
- package/src/ui/hooks/useProfileEditing.ts +3 -3
- package/src/ui/hooks/useSessionManagement.ts +405 -0
- package/src/ui/index.ts +1 -2
- package/src/ui/navigation/routes.ts +2 -6
- package/src/ui/screens/AccountCenterScreen.tsx +4 -9
- package/src/ui/screens/AccountSettingsScreen.tsx +31 -49
- package/src/ui/screens/AccountSwitcherScreen.tsx +5 -5
- package/src/ui/screens/OxyAuthScreen.tsx +19 -4
- package/src/ui/screens/PrivacySettingsScreen.tsx +101 -67
- package/src/ui/screens/ProfileScreen.tsx +10 -10
- package/src/ui/stores/authStore.ts +8 -48
- package/src/ui/styles/spacing.ts +2 -15
- package/src/ui/utils/avatarUtils.ts +21 -19
- package/src/ui/utils/sessionHelpers.ts +0 -7
- package/src/utils/__tests__/validationUtils.test.ts +1 -16
- package/src/utils/deviceManager.ts +198 -0
- package/src/utils/errorUtils.ts +1 -8
- package/src/utils/index.ts +2 -1
- package/src/utils/sessionUtils.ts +0 -8
- package/src/utils/validationUtils.ts +0 -12
- package/lib/commonjs/adapters/expo/crypto.js +0 -56
- package/lib/commonjs/adapters/expo/crypto.js.map +0 -1
- package/lib/commonjs/adapters/expo/fetch.js +0 -30
- package/lib/commonjs/adapters/expo/fetch.js.map +0 -1
- package/lib/commonjs/adapters/expo/index.js +0 -48
- package/lib/commonjs/adapters/expo/index.js.map +0 -1
- package/lib/commonjs/adapters/expo/storage.js +0 -201
- package/lib/commonjs/adapters/expo/storage.js.map +0 -1
- package/lib/commonjs/adapters/index.js +0 -48
- package/lib/commonjs/adapters/index.js.map +0 -1
- package/lib/commonjs/adapters/node/crypto.js +0 -40
- package/lib/commonjs/adapters/node/crypto.js.map +0 -1
- package/lib/commonjs/adapters/node/fetch.js +0 -62
- package/lib/commonjs/adapters/node/fetch.js.map +0 -1
- package/lib/commonjs/adapters/node/index.js +0 -34
- package/lib/commonjs/adapters/node/index.js.map +0 -1
- package/lib/commonjs/adapters/node/storage.js +0 -163
- package/lib/commonjs/adapters/node/storage.js.map +0 -1
- package/lib/commonjs/core/identity-session/DeviceManager.js +0 -237
- package/lib/commonjs/core/identity-session/DeviceManager.js.map +0 -1
- package/lib/commonjs/core/identity-session/INTEGRATION_GUIDE.md +0 -287
- package/lib/commonjs/core/identity-session/IdentityManager.js +0 -400
- package/lib/commonjs/core/identity-session/IdentityManager.js.map +0 -1
- package/lib/commonjs/core/identity-session/IdentitySessionCore.js +0 -394
- package/lib/commonjs/core/identity-session/IdentitySessionCore.js.map +0 -1
- package/lib/commonjs/core/identity-session/RefreshManager.js +0 -137
- package/lib/commonjs/core/identity-session/RefreshManager.js.map +0 -1
- package/lib/commonjs/core/identity-session/SessionManager.js +0 -427
- package/lib/commonjs/core/identity-session/SessionManager.js.map +0 -1
- package/lib/commonjs/core/identity-session/createIdentitySessionCore.js +0 -24
- package/lib/commonjs/core/identity-session/createIdentitySessionCore.js.map +0 -1
- package/lib/commonjs/core/identity-session/errors.js +0 -176
- package/lib/commonjs/core/identity-session/errors.js.map +0 -1
- package/lib/commonjs/core/identity-session/index.js +0 -80
- package/lib/commonjs/core/identity-session/index.js.map +0 -1
- package/lib/commonjs/core/identity-session/types.js +0 -2
- package/lib/commonjs/core/identity-session/types.js.map +0 -1
- package/lib/commonjs/crypto/README.md +0 -142
- package/lib/commonjs/crypto/core.js +0 -147
- package/lib/commonjs/crypto/core.js.map +0 -1
- package/lib/commonjs/node/signatureService.js +0 -107
- package/lib/commonjs/node/signatureService.js.map +0 -1
- package/lib/commonjs/ui/hooks/auth/index.js +0 -37
- package/lib/commonjs/ui/hooks/auth/index.js.map +0 -1
- package/lib/commonjs/ui/hooks/auth/useUsernameValidation.js +0 -171
- package/lib/commonjs/ui/hooks/auth/useUsernameValidation.js.map +0 -1
- package/lib/commonjs/ui/hooks/useAvatarPicker.js +0 -52
- package/lib/commonjs/ui/hooks/useAvatarPicker.js.map +0 -1
- package/lib/commonjs/ui/hooks/useIdentityTransfer.js +0 -125
- package/lib/commonjs/ui/hooks/useIdentityTransfer.js.map +0 -1
- package/lib/commonjs/ui/hooks/useTransferCodesPersistence.js +0 -81
- package/lib/commonjs/ui/hooks/useTransferCodesPersistence.js.map +0 -1
- package/lib/commonjs/ui/hooks/useTransferQueries.js +0 -85
- package/lib/commonjs/ui/hooks/useTransferQueries.js.map +0 -1
- package/lib/commonjs/ui/stores/transferStore.js +0 -157
- package/lib/commonjs/ui/stores/transferStore.js.map +0 -1
- package/lib/module/adapters/expo/crypto.js +0 -51
- package/lib/module/adapters/expo/crypto.js.map +0 -1
- package/lib/module/adapters/expo/fetch.js +0 -26
- package/lib/module/adapters/expo/fetch.js.map +0 -1
- package/lib/module/adapters/expo/index.js +0 -45
- package/lib/module/adapters/expo/index.js.map +0 -1
- package/lib/module/adapters/expo/storage.js +0 -198
- package/lib/module/adapters/expo/storage.js.map +0 -1
- package/lib/module/adapters/index.js +0 -45
- package/lib/module/adapters/index.js.map +0 -1
- package/lib/module/adapters/node/crypto.js +0 -36
- package/lib/module/adapters/node/crypto.js.map +0 -1
- package/lib/module/adapters/node/fetch.js +0 -57
- package/lib/module/adapters/node/fetch.js.map +0 -1
- package/lib/module/adapters/node/index.js +0 -31
- package/lib/module/adapters/node/index.js.map +0 -1
- package/lib/module/adapters/node/storage.js +0 -159
- package/lib/module/adapters/node/storage.js.map +0 -1
- package/lib/module/core/identity-session/DeviceManager.js +0 -232
- package/lib/module/core/identity-session/DeviceManager.js.map +0 -1
- package/lib/module/core/identity-session/INTEGRATION_GUIDE.md +0 -287
- package/lib/module/core/identity-session/IdentityManager.js +0 -395
- package/lib/module/core/identity-session/IdentityManager.js.map +0 -1
- package/lib/module/core/identity-session/IdentitySessionCore.js +0 -390
- package/lib/module/core/identity-session/IdentitySessionCore.js.map +0 -1
- package/lib/module/core/identity-session/RefreshManager.js +0 -132
- package/lib/module/core/identity-session/RefreshManager.js.map +0 -1
- package/lib/module/core/identity-session/SessionManager.js +0 -422
- package/lib/module/core/identity-session/SessionManager.js.map +0 -1
- package/lib/module/core/identity-session/createIdentitySessionCore.js +0 -21
- package/lib/module/core/identity-session/createIdentitySessionCore.js.map +0 -1
- package/lib/module/core/identity-session/errors.js +0 -170
- package/lib/module/core/identity-session/errors.js.map +0 -1
- package/lib/module/core/identity-session/index.js +0 -17
- package/lib/module/core/identity-session/index.js.map +0 -1
- package/lib/module/core/identity-session/types.js +0 -2
- package/lib/module/core/identity-session/types.js.map +0 -1
- package/lib/module/crypto/README.md +0 -142
- package/lib/module/crypto/core.js +0 -133
- package/lib/module/crypto/core.js.map +0 -1
- package/lib/module/node/signatureService.js +0 -101
- package/lib/module/node/signatureService.js.map +0 -1
- package/lib/module/ui/hooks/auth/index.js +0 -7
- package/lib/module/ui/hooks/auth/index.js.map +0 -1
- package/lib/module/ui/hooks/auth/useUsernameValidation.js +0 -167
- package/lib/module/ui/hooks/auth/useUsernameValidation.js.map +0 -1
- package/lib/module/ui/hooks/useAvatarPicker.js +0 -48
- package/lib/module/ui/hooks/useAvatarPicker.js.map +0 -1
- package/lib/module/ui/hooks/useIdentityTransfer.js +0 -121
- package/lib/module/ui/hooks/useIdentityTransfer.js.map +0 -1
- package/lib/module/ui/hooks/useTransferCodesPersistence.js +0 -77
- package/lib/module/ui/hooks/useTransferCodesPersistence.js.map +0 -1
- package/lib/module/ui/hooks/useTransferQueries.js +0 -80
- package/lib/module/ui/hooks/useTransferQueries.js.map +0 -1
- package/lib/module/ui/stores/transferStore.js +0 -152
- package/lib/module/ui/stores/transferStore.js.map +0 -1
- package/lib/typescript/adapters/expo/crypto.d.ts +0 -17
- package/lib/typescript/adapters/expo/crypto.d.ts.map +0 -1
- package/lib/typescript/adapters/expo/fetch.d.ts +0 -16
- package/lib/typescript/adapters/expo/fetch.d.ts.map +0 -1
- package/lib/typescript/adapters/expo/index.d.ts +0 -23
- package/lib/typescript/adapters/expo/index.d.ts.map +0 -1
- package/lib/typescript/adapters/expo/storage.d.ts +0 -23
- package/lib/typescript/adapters/expo/storage.d.ts.map +0 -1
- package/lib/typescript/adapters/index.d.ts +0 -17
- package/lib/typescript/adapters/index.d.ts.map +0 -1
- package/lib/typescript/adapters/node/crypto.d.ts +0 -17
- package/lib/typescript/adapters/node/crypto.d.ts.map +0 -1
- package/lib/typescript/adapters/node/fetch.d.ts +0 -16
- package/lib/typescript/adapters/node/fetch.d.ts.map +0 -1
- package/lib/typescript/adapters/node/index.d.ts +0 -23
- package/lib/typescript/adapters/node/index.d.ts.map +0 -1
- package/lib/typescript/adapters/node/storage.d.ts +0 -23
- package/lib/typescript/adapters/node/storage.d.ts.map +0 -1
- package/lib/typescript/core/identity-session/DeviceManager.d.ts +0 -64
- package/lib/typescript/core/identity-session/DeviceManager.d.ts.map +0 -1
- package/lib/typescript/core/identity-session/IdentityManager.d.ts +0 -88
- package/lib/typescript/core/identity-session/IdentityManager.d.ts.map +0 -1
- package/lib/typescript/core/identity-session/IdentitySessionCore.d.ts +0 -141
- package/lib/typescript/core/identity-session/IdentitySessionCore.d.ts.map +0 -1
- package/lib/typescript/core/identity-session/RefreshManager.d.ts +0 -36
- package/lib/typescript/core/identity-session/RefreshManager.d.ts.map +0 -1
- package/lib/typescript/core/identity-session/SessionManager.d.ts +0 -104
- package/lib/typescript/core/identity-session/SessionManager.d.ts.map +0 -1
- package/lib/typescript/core/identity-session/createIdentitySessionCore.d.ts +0 -11
- package/lib/typescript/core/identity-session/createIdentitySessionCore.d.ts.map +0 -1
- package/lib/typescript/core/identity-session/errors.d.ts +0 -63
- package/lib/typescript/core/identity-session/errors.d.ts.map +0 -1
- package/lib/typescript/core/identity-session/index.d.ts +0 -14
- package/lib/typescript/core/identity-session/index.d.ts.map +0 -1
- package/lib/typescript/core/identity-session/types.d.ts +0 -196
- package/lib/typescript/core/identity-session/types.d.ts.map +0 -1
- package/lib/typescript/crypto/core.d.ts +0 -56
- package/lib/typescript/crypto/core.d.ts.map +0 -1
- package/lib/typescript/node/signatureService.d.ts +0 -55
- package/lib/typescript/node/signatureService.d.ts.map +0 -1
- package/lib/typescript/ui/hooks/auth/index.d.ts +0 -6
- package/lib/typescript/ui/hooks/auth/index.d.ts.map +0 -1
- package/lib/typescript/ui/hooks/auth/useUsernameValidation.d.ts +0 -32
- package/lib/typescript/ui/hooks/auth/useUsernameValidation.d.ts.map +0 -1
- package/lib/typescript/ui/hooks/useAvatarPicker.d.ts +0 -18
- package/lib/typescript/ui/hooks/useAvatarPicker.d.ts.map +0 -1
- package/lib/typescript/ui/hooks/useIdentityTransfer.d.ts +0 -24
- package/lib/typescript/ui/hooks/useIdentityTransfer.d.ts.map +0 -1
- package/lib/typescript/ui/hooks/useTransferCodesPersistence.d.ts +0 -6
- package/lib/typescript/ui/hooks/useTransferCodesPersistence.d.ts.map +0 -1
- package/lib/typescript/ui/hooks/useTransferQueries.d.ts +0 -26
- package/lib/typescript/ui/hooks/useTransferQueries.d.ts.map +0 -1
- package/lib/typescript/ui/stores/transferStore.d.ts +0 -36
- package/lib/typescript/ui/stores/transferStore.d.ts.map +0 -1
- package/src/adapters/expo/crypto.ts +0 -55
- package/src/adapters/expo/fetch.ts +0 -28
- package/src/adapters/expo/index.ts +0 -51
- package/src/adapters/expo/storage.ts +0 -228
- package/src/adapters/index.ts +0 -48
- package/src/adapters/node/crypto.ts +0 -39
- package/src/adapters/node/fetch.ts +0 -59
- package/src/adapters/node/index.ts +0 -37
- package/src/adapters/node/storage.ts +0 -170
- package/src/core/identity-session/DeviceManager.ts +0 -273
- package/src/core/identity-session/INTEGRATION_GUIDE.md +0 -287
- package/src/core/identity-session/IdentityManager.ts +0 -474
- package/src/core/identity-session/IdentitySessionCore.ts +0 -464
- package/src/core/identity-session/RefreshManager.ts +0 -189
- package/src/core/identity-session/SessionManager.ts +0 -500
- package/src/core/identity-session/createIdentitySessionCore.ts +0 -19
- package/src/core/identity-session/errors.ts +0 -197
- package/src/core/identity-session/index.ts +0 -15
- package/src/core/identity-session/types.ts +0 -188
- package/src/crypto/README.md +0 -142
- package/src/crypto/__tests__/core.test.ts +0 -203
- package/src/crypto/core.ts +0 -142
- package/src/node/signatureService.ts +0 -126
- package/src/ui/hooks/auth/index.ts +0 -9
- package/src/ui/hooks/auth/useUsernameValidation.ts +0 -177
- package/src/ui/hooks/useAvatarPicker.ts +0 -62
- package/src/ui/hooks/useIdentityTransfer.ts +0 -135
- package/src/ui/hooks/useTransferCodesPersistence.ts +0 -80
- package/src/ui/hooks/useTransferQueries.ts +0 -102
- package/src/ui/stores/transferStore.ts +0 -201
|
@@ -22,7 +22,6 @@ import { MaterialCommunityIcons } from '@expo/vector-icons';
|
|
|
22
22
|
import { toast } from '../../lib/sonner';
|
|
23
23
|
import { fontFamilies } from '../styles/fonts';
|
|
24
24
|
import { confirmAction } from '../utils/confirmAction';
|
|
25
|
-
import { useAuthStore } from '../stores/authStore';
|
|
26
25
|
import { Header, GroupedSection, Section } from '../components';
|
|
27
26
|
import { useI18n } from '../hooks/useI18n';
|
|
28
27
|
import { useThemeStyles } from '../hooks/useThemeStyles';
|
|
@@ -77,13 +76,9 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
77
76
|
const normalizedTheme = normalizeTheme(theme);
|
|
78
77
|
|
|
79
78
|
// Use TanStack Query for user data
|
|
80
|
-
const { data:
|
|
79
|
+
const { data: finalUser, isLoading: userLoading } = useCurrentUser({ enabled: isAuthenticated });
|
|
81
80
|
const updateProfileMutation = useUpdateProfile();
|
|
82
81
|
const uploadAvatarMutation = useUploadAvatar();
|
|
83
|
-
|
|
84
|
-
// Fallback to store for backward compatibility
|
|
85
|
-
const userFromStore = useAuthStore((state) => state.user);
|
|
86
|
-
const finalUser = user || userFromStore;
|
|
87
82
|
const [isLoading, setIsLoading] = useState(false);
|
|
88
83
|
const isSaving = updateProfileMutation.isPending;
|
|
89
84
|
const isUpdatingAvatar = uploadAvatarMutation.isPending;
|
|
@@ -229,17 +224,17 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
229
224
|
setUsername(finalUser.username || '');
|
|
230
225
|
setEmail(finalUser.email || '');
|
|
231
226
|
setBio(finalUser.bio || '');
|
|
232
|
-
setLocation(
|
|
227
|
+
setLocation(finalUser.location || '');
|
|
233
228
|
|
|
234
229
|
// Handle locations - convert single location to array format
|
|
235
230
|
if (finalUser.locations && Array.isArray(finalUser.locations)) {
|
|
236
|
-
setLocations(finalUser.locations.map((loc, index) => ({
|
|
231
|
+
setLocations(finalUser.locations.map((loc: any, index: number) => ({
|
|
237
232
|
id: loc.id || `existing-${index}`,
|
|
238
233
|
name: loc.name,
|
|
239
234
|
label: loc.label,
|
|
240
235
|
coordinates: loc.coordinates
|
|
241
236
|
})));
|
|
242
|
-
} else if (finalUser.location
|
|
237
|
+
} else if (finalUser.location) {
|
|
243
238
|
// Convert single location string to array format
|
|
244
239
|
setLocations([{
|
|
245
240
|
id: 'existing-0',
|
|
@@ -252,17 +247,17 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
252
247
|
|
|
253
248
|
// Handle links - simple and direct like other fields
|
|
254
249
|
if (finalUser.linksMetadata && Array.isArray(finalUser.linksMetadata)) {
|
|
255
|
-
const urls = finalUser.linksMetadata.map(l => l.url);
|
|
250
|
+
const urls = finalUser.linksMetadata.map((l: any) => l.url);
|
|
256
251
|
setLinks(urls);
|
|
257
|
-
const metadataWithIds = finalUser.linksMetadata.map((link, index) => ({
|
|
252
|
+
const metadataWithIds = finalUser.linksMetadata.map((link: any, index: number) => ({
|
|
258
253
|
...link,
|
|
259
|
-
id:
|
|
254
|
+
id: link.id || `existing-${index}`
|
|
260
255
|
}));
|
|
261
256
|
setLinksMetadata(metadataWithIds);
|
|
262
257
|
} else if (Array.isArray(finalUser.links)) {
|
|
263
|
-
const simpleLinks = finalUser.links.map(l => typeof l === 'string' ? l :
|
|
258
|
+
const simpleLinks = finalUser.links.map((l: any) => typeof l === 'string' ? l : l.link).filter(Boolean);
|
|
264
259
|
setLinks(simpleLinks);
|
|
265
|
-
const linksWithMetadata = simpleLinks.map((url, index) => ({
|
|
260
|
+
const linksWithMetadata = simpleLinks.map((url: string, index: number) => ({
|
|
266
261
|
url,
|
|
267
262
|
title: url.replace(/^https?:\/\//, '').replace(/\/$/, ''),
|
|
268
263
|
description: `Link to ${url}`,
|
|
@@ -270,7 +265,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
270
265
|
id: `existing-${index}`
|
|
271
266
|
}));
|
|
272
267
|
setLinksMetadata(linksWithMetadata);
|
|
273
|
-
} else if (finalUser.website
|
|
268
|
+
} else if (finalUser.website) {
|
|
274
269
|
setLinks([finalUser.website]);
|
|
275
270
|
setLinksMetadata([{
|
|
276
271
|
url: finalUser.website,
|
|
@@ -388,14 +383,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
388
383
|
setLocations(tempLocations);
|
|
389
384
|
break;
|
|
390
385
|
case 'links':
|
|
391
|
-
|
|
392
|
-
const linksWithRequiredFields = tempLinksWithMetadata.map(link => ({
|
|
393
|
-
url: link.url,
|
|
394
|
-
title: link.title || link.url.replace(/^https?:\/\//, '').replace(/\/$/, ''),
|
|
395
|
-
description: link.description || `Link to ${link.url}`,
|
|
396
|
-
image: link.image,
|
|
397
|
-
}));
|
|
398
|
-
await updateProfileMutation.mutateAsync({ linksMetadata: linksWithRequiredFields });
|
|
386
|
+
await updateProfileMutation.mutateAsync({ linksMetadata: tempLinksWithMetadata });
|
|
399
387
|
setLinksMetadata(tempLinksWithMetadata);
|
|
400
388
|
setLinks(tempLinksWithMetadata.map(l => l.url));
|
|
401
389
|
break;
|
|
@@ -521,54 +509,48 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
521
509
|
const handleOpenLinksModal = useCallback(() => setShowEditLinksModal(true), []);
|
|
522
510
|
|
|
523
511
|
// Handler to refresh data after modal saves
|
|
524
|
-
// Note:
|
|
525
|
-
// not from closure which may be stale after modal saves update the backend
|
|
512
|
+
// Note: Query will automatically refetch after mutations invalidate it
|
|
526
513
|
const handleModalSave = useCallback(() => {
|
|
527
|
-
// Get fresh user data from store to ensure we have the latest values
|
|
528
|
-
// after the modal's save operation updates the backend
|
|
529
|
-
// Read from store directly (not from closure) to avoid stale data
|
|
530
|
-
const currentUser = useAuthStore.getState().user;
|
|
531
|
-
|
|
532
514
|
// Reload user data to reflect changes
|
|
533
|
-
if (
|
|
534
|
-
const userDisplayName = typeof
|
|
535
|
-
?
|
|
536
|
-
:
|
|
537
|
-
const userLastName = typeof
|
|
515
|
+
if (finalUser) {
|
|
516
|
+
const userDisplayName = typeof finalUser.name === 'string'
|
|
517
|
+
? finalUser.name
|
|
518
|
+
: finalUser.name?.first || finalUser.name?.full || '';
|
|
519
|
+
const userLastName = typeof finalUser.name === 'object' ? finalUser.name?.last || '' : '';
|
|
538
520
|
setDisplayName(userDisplayName);
|
|
539
521
|
setLastName(userLastName);
|
|
540
|
-
setUsername(
|
|
541
|
-
setEmail(
|
|
542
|
-
setBio(
|
|
522
|
+
setUsername(finalUser.username || '');
|
|
523
|
+
setEmail(finalUser.email || '');
|
|
524
|
+
setBio(finalUser.bio || '');
|
|
543
525
|
|
|
544
526
|
// Reload locations and links
|
|
545
|
-
if (
|
|
546
|
-
setLocations(
|
|
527
|
+
if (finalUser.locations && Array.isArray(finalUser.locations)) {
|
|
528
|
+
setLocations(finalUser.locations.map((loc: any, index: number) => ({
|
|
547
529
|
id: loc.id || `existing-${index}`,
|
|
548
530
|
name: loc.name,
|
|
549
531
|
label: loc.label,
|
|
550
532
|
coordinates: loc.coordinates
|
|
551
533
|
})));
|
|
552
|
-
} else if (
|
|
534
|
+
} else if (finalUser.location) {
|
|
553
535
|
setLocations([{
|
|
554
536
|
id: 'existing-0',
|
|
555
|
-
name:
|
|
537
|
+
name: finalUser.location,
|
|
556
538
|
label: 'Location'
|
|
557
539
|
}]);
|
|
558
540
|
} else {
|
|
559
541
|
setLocations([]);
|
|
560
542
|
}
|
|
561
543
|
|
|
562
|
-
if (
|
|
563
|
-
setLinksMetadata(
|
|
544
|
+
if (finalUser.linksMetadata && Array.isArray(finalUser.linksMetadata)) {
|
|
545
|
+
setLinksMetadata(finalUser.linksMetadata.map((link: any, index: number) => ({
|
|
564
546
|
...link,
|
|
565
|
-
id:
|
|
547
|
+
id: link.id || `existing-${index}`
|
|
566
548
|
})));
|
|
567
549
|
} else {
|
|
568
550
|
setLinksMetadata([]);
|
|
569
551
|
}
|
|
570
552
|
}
|
|
571
|
-
}, []); //
|
|
553
|
+
}, [finalUser]); // Query will automatically refetch after mutations
|
|
572
554
|
|
|
573
555
|
// Handle initialField prop - open appropriate modal
|
|
574
556
|
useEffect(() => {
|
|
@@ -836,7 +818,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
836
818
|
{/* Search results */}
|
|
837
819
|
{locationSearchResults.length > 0 && (
|
|
838
820
|
<View style={styles.searchResults}>
|
|
839
|
-
{locationSearchResults.map((result) => (
|
|
821
|
+
{locationSearchResults.map((result: any) => (
|
|
840
822
|
<TouchableOpacity
|
|
841
823
|
key={result.place_id}
|
|
842
824
|
style={styles.searchResultItem}
|
|
@@ -867,7 +849,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
867
849
|
{tempLocations.length > 0 && (
|
|
868
850
|
<View style={styles.locationsList}>
|
|
869
851
|
<Text style={styles.locationsListTitle}>Your Locations ({tempLocations.length})</Text>
|
|
870
|
-
{tempLocations.map((location, index) => (
|
|
852
|
+
{tempLocations.map((location: any, index: number) => (
|
|
871
853
|
<View key={location.id} style={styles.locationItem}>
|
|
872
854
|
<View style={styles.locationItemContent}>
|
|
873
855
|
<View style={styles.locationItemDragHandle}>
|
|
@@ -995,7 +977,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
995
977
|
onPress: () => setIsAddingLink(true),
|
|
996
978
|
}]),
|
|
997
979
|
// Existing links
|
|
998
|
-
...tempLinksWithMetadata.map((link, index) => ({
|
|
980
|
+
...tempLinksWithMetadata.map((link: any, index: number) => ({
|
|
999
981
|
id: link.id,
|
|
1000
982
|
customIcon: link.image ? (
|
|
1001
983
|
<Image source={{ uri: link.image }} style={{ width: 36, height: 36, borderRadius: 18 }} />
|
|
@@ -405,7 +405,7 @@ const ModernAccountSwitcherScreen: React.FC<BaseScreenProps> = ({
|
|
|
405
405
|
) : (
|
|
406
406
|
<View style={styles.accountAvatarFallback}>
|
|
407
407
|
<Text style={styles.accountAvatarText}>
|
|
408
|
-
{displayName
|
|
408
|
+
{displayName.charAt(0).toUpperCase()}
|
|
409
409
|
</Text>
|
|
410
410
|
</View>
|
|
411
411
|
)}
|
|
@@ -432,7 +432,7 @@ const ModernAccountSwitcherScreen: React.FC<BaseScreenProps> = ({
|
|
|
432
432
|
</TouchableOpacity>
|
|
433
433
|
<TouchableOpacity
|
|
434
434
|
style={styles.removeButton}
|
|
435
|
-
onPress={() => handleRemoveSession(sessionWithUser.sessionId, displayName
|
|
435
|
+
onPress={() => handleRemoveSession(sessionWithUser.sessionId, displayName)}
|
|
436
436
|
disabled={isSwitching || isRemoving}
|
|
437
437
|
>
|
|
438
438
|
{isRemoving ? (
|
|
@@ -460,7 +460,7 @@ const ModernAccountSwitcherScreen: React.FC<BaseScreenProps> = ({
|
|
|
460
460
|
iconColor: '#007AFF',
|
|
461
461
|
title: 'Add Another Account',
|
|
462
462
|
subtitle: 'Sign in with a different account',
|
|
463
|
-
onPress: () => navigate?.('
|
|
463
|
+
onPress: () => navigate?.('OxyAuth'),
|
|
464
464
|
},
|
|
465
465
|
{
|
|
466
466
|
id: 'device-management',
|
|
@@ -561,7 +561,7 @@ const ModernAccountSwitcherScreen: React.FC<BaseScreenProps> = ({
|
|
|
561
561
|
iconColor: '#ccc',
|
|
562
562
|
title: t('accountSwitcher.empty.title') || 'No saved accounts',
|
|
563
563
|
subtitle: t('accountSwitcher.empty.subtitle') || 'Add another account to switch between them quickly',
|
|
564
|
-
onPress: () => navigate?.('
|
|
564
|
+
onPress: () => navigate?.('OxyAuth'),
|
|
565
565
|
customContent: (
|
|
566
566
|
<View style={styles.emptyStateContainer}>
|
|
567
567
|
<OxyIcon name="person-outline" size={48} color="#ccc" />
|
|
@@ -571,7 +571,7 @@ const ModernAccountSwitcherScreen: React.FC<BaseScreenProps> = ({
|
|
|
571
571
|
</Text>
|
|
572
572
|
<TouchableOpacity
|
|
573
573
|
style={styles.addAccountButton}
|
|
574
|
-
onPress={() => navigate?.('
|
|
574
|
+
onPress={() => navigate?.('OxyAuth')}
|
|
575
575
|
>
|
|
576
576
|
<Text style={styles.addAccountButtonText}>{t('accountCenter.sections.addAccount') || 'Add Account'}</Text>
|
|
577
577
|
</TouchableOpacity>
|
|
@@ -72,6 +72,22 @@ const OxyAuthScreen: React.FC<BaseScreenProps> = ({
|
|
|
72
72
|
const pollingIntervalRef = useRef<ReturnType<typeof setInterval> | null>(null);
|
|
73
73
|
const isProcessingRef = useRef(false);
|
|
74
74
|
|
|
75
|
+
const resolveDeviceIdForSession = useCallback(
|
|
76
|
+
async (sessionId: string): Promise<string | undefined> => {
|
|
77
|
+
try {
|
|
78
|
+
const deviceSessions = await oxyServices.getDeviceSessions(sessionId);
|
|
79
|
+
const matchingSession = deviceSessions?.find((session) => session.sessionId === sessionId);
|
|
80
|
+
return matchingSession?.deviceId || undefined;
|
|
81
|
+
} catch (err) {
|
|
82
|
+
if (__DEV__) {
|
|
83
|
+
console.log('Failed to resolve deviceId for session', err);
|
|
84
|
+
}
|
|
85
|
+
return undefined;
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
[oxyServices],
|
|
89
|
+
);
|
|
90
|
+
|
|
75
91
|
// Handle successful authorization
|
|
76
92
|
const handleAuthSuccess = useCallback(async (sessionId: string) => {
|
|
77
93
|
if (isProcessingRef.current) return;
|
|
@@ -86,7 +102,8 @@ const OxyAuthScreen: React.FC<BaseScreenProps> = ({
|
|
|
86
102
|
}
|
|
87
103
|
} else {
|
|
88
104
|
// Fallback if switchSession not available (shouldn't happen, but for safety)
|
|
89
|
-
await
|
|
105
|
+
const deviceId = await resolveDeviceIdForSession(sessionId);
|
|
106
|
+
await oxyServices.getTokenBySession(sessionId, deviceId);
|
|
90
107
|
const user = await oxyServices.getUserBySession(sessionId);
|
|
91
108
|
if (onAuthenticated) {
|
|
92
109
|
onAuthenticated(user);
|
|
@@ -99,7 +116,7 @@ const OxyAuthScreen: React.FC<BaseScreenProps> = ({
|
|
|
99
116
|
setError('Authorization successful but failed to complete sign in. Please try again.');
|
|
100
117
|
isProcessingRef.current = false;
|
|
101
118
|
}
|
|
102
|
-
}, [oxyServices, switchSession, onAuthenticated]);
|
|
119
|
+
}, [oxyServices, resolveDeviceIdForSession, switchSession, onAuthenticated]);
|
|
103
120
|
|
|
104
121
|
// Connect to socket for real-time updates
|
|
105
122
|
const connectSocket = useCallback((sessionToken: string) => {
|
|
@@ -523,5 +540,3 @@ const styles = StyleSheet.create({
|
|
|
523
540
|
});
|
|
524
541
|
|
|
525
542
|
export default OxyAuthScreen;
|
|
526
|
-
|
|
527
|
-
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import React, { useState, useCallback, useMemo } from 'react';
|
|
1
|
+
import React, { useState, useCallback, useEffect, useMemo } from 'react';
|
|
2
2
|
import {
|
|
3
3
|
View,
|
|
4
4
|
Text,
|
|
5
5
|
StyleSheet,
|
|
6
6
|
ScrollView,
|
|
7
|
+
ActivityIndicator,
|
|
7
8
|
TouchableOpacity,
|
|
8
9
|
} from 'react-native';
|
|
9
10
|
import type { BaseScreenProps } from '../types/navigation';
|
|
@@ -14,8 +15,6 @@ import { useThemeStyles } from '../hooks/useThemeStyles';
|
|
|
14
15
|
import { normalizeTheme } from '../utils/themeUtils';
|
|
15
16
|
import type { BlockedUser, RestrictedUser } from '../../models/interfaces';
|
|
16
17
|
import { useOxy } from '../context/OxyContext';
|
|
17
|
-
import { usePrivacySettings, useBlockedUsers, useRestrictedUsers } from '../hooks/queries';
|
|
18
|
-
import { useUpdatePrivacySettings, useUnblockUser, useUnrestrictUser } from '../hooks/mutations';
|
|
19
18
|
|
|
20
19
|
interface PrivacySettings {
|
|
21
20
|
isPrivateAccount: boolean;
|
|
@@ -45,20 +44,8 @@ const PrivacySettingsScreen: React.FC<BaseScreenProps> = ({
|
|
|
45
44
|
goBack,
|
|
46
45
|
}) => {
|
|
47
46
|
// Use useOxy() hook for OxyContext values
|
|
48
|
-
const { oxyServices } = useOxy();
|
|
47
|
+
const { oxyServices, user } = useOxy();
|
|
49
48
|
const { t } = useI18n();
|
|
50
|
-
|
|
51
|
-
// TanStack Query hooks for server state
|
|
52
|
-
const { data: privacySettingsData, isLoading: isLoadingSettings, error: settingsError } = usePrivacySettings();
|
|
53
|
-
const { data: blockedUsers = [], isLoading: isLoadingBlocked } = useBlockedUsers();
|
|
54
|
-
const { data: restrictedUsers = [], isLoading: isLoadingRestricted } = useRestrictedUsers();
|
|
55
|
-
|
|
56
|
-
// Mutations
|
|
57
|
-
const updatePrivacySettingsMutation = useUpdatePrivacySettings();
|
|
58
|
-
const unblockUserMutation = useUnblockUser();
|
|
59
|
-
const unrestrictUserMutation = useUnrestrictUser();
|
|
60
|
-
|
|
61
|
-
// Client state for optimistic UI updates
|
|
62
49
|
const [settings, setSettings] = useState<PrivacySettings>({
|
|
63
50
|
isPrivateAccount: false,
|
|
64
51
|
hideOnlineStatus: false,
|
|
@@ -80,64 +67,111 @@ const PrivacySettingsScreen: React.FC<BaseScreenProps> = ({
|
|
|
80
67
|
autoFilter: true,
|
|
81
68
|
muteKeywords: false,
|
|
82
69
|
});
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
70
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
71
|
+
const [isSaving, setIsSaving] = useState(false);
|
|
72
|
+
const [blockedUsers, setBlockedUsers] = useState<BlockedUser[]>([]);
|
|
73
|
+
const [restrictedUsers, setRestrictedUsers] = useState<RestrictedUser[]>([]);
|
|
74
|
+
const [isLoadingUsers, setIsLoadingUsers] = useState(false);
|
|
75
|
+
|
|
76
|
+
// Load settings and users
|
|
77
|
+
useEffect(() => {
|
|
78
|
+
const loadSettings = async () => {
|
|
79
|
+
try {
|
|
80
|
+
setIsLoading(true);
|
|
81
|
+
// Use getCurrentUserId() which returns MongoDB ObjectId from JWT token
|
|
82
|
+
// Never use user?.id as it may be set to publicKey
|
|
83
|
+
const userId = oxyServices?.getCurrentUserId();
|
|
84
|
+
if (userId && oxyServices) {
|
|
85
|
+
const privacySettings = await oxyServices.getPrivacySettings(userId);
|
|
86
|
+
if (privacySettings) {
|
|
87
|
+
setSettings(privacySettings);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
} catch (error) {
|
|
91
|
+
console.error('Failed to load privacy settings:', error);
|
|
92
|
+
toast.error(t('privacySettings.loadError') || 'Failed to load privacy settings');
|
|
93
|
+
} finally {
|
|
94
|
+
setIsLoading(false);
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
loadSettings();
|
|
99
|
+
}, [oxyServices, t]);
|
|
100
|
+
|
|
101
|
+
// Load blocked and restricted users
|
|
102
|
+
useEffect(() => {
|
|
103
|
+
const loadUsers = async () => {
|
|
104
|
+
if (!oxyServices) return;
|
|
105
|
+
try {
|
|
106
|
+
setIsLoadingUsers(true);
|
|
107
|
+
const [blocked, restricted] = await Promise.all([
|
|
108
|
+
oxyServices.getBlockedUsers(),
|
|
109
|
+
oxyServices.getRestrictedUsers(),
|
|
110
|
+
]);
|
|
111
|
+
setBlockedUsers(blocked);
|
|
112
|
+
setRestrictedUsers(restricted);
|
|
113
|
+
} catch (error) {
|
|
114
|
+
console.error('Failed to load blocked/restricted users:', error);
|
|
115
|
+
} finally {
|
|
116
|
+
setIsLoadingUsers(false);
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
loadUsers();
|
|
121
|
+
}, [oxyServices]);
|
|
101
122
|
|
|
102
123
|
const updateSetting = useCallback(async (key: keyof PrivacySettings, value: boolean) => {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
toast.error(t('privacySettings.updateError') || 'Failed to update privacy setting');
|
|
115
|
-
},
|
|
124
|
+
try {
|
|
125
|
+
setIsSaving(true);
|
|
126
|
+
const newSettings = { ...settings, [key]: value };
|
|
127
|
+
setSettings(newSettings);
|
|
128
|
+
|
|
129
|
+
// Use getCurrentUserId() which returns MongoDB ObjectId from JWT token
|
|
130
|
+
// Never use user?.id as it may be set to publicKey
|
|
131
|
+
const userId = oxyServices?.getCurrentUserId();
|
|
132
|
+
if (userId && oxyServices) {
|
|
133
|
+
await oxyServices.updatePrivacySettings({ [key]: value }, userId);
|
|
134
|
+
toast.success(t('privacySettings.updated') || 'Privacy settings updated');
|
|
116
135
|
}
|
|
117
|
-
)
|
|
118
|
-
|
|
136
|
+
} catch (error) {
|
|
137
|
+
console.error(`Failed to update ${key}:`, error);
|
|
138
|
+
toast.error(t('privacySettings.updateError') || 'Failed to update privacy setting');
|
|
139
|
+
// Revert on error
|
|
140
|
+
setSettings(settings);
|
|
141
|
+
} finally {
|
|
142
|
+
setIsSaving(false);
|
|
143
|
+
}
|
|
144
|
+
}, [settings, oxyServices, t]);
|
|
119
145
|
|
|
120
146
|
const handleUnblock = useCallback(async (userId: string) => {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
|
|
147
|
+
if (!oxyServices) return;
|
|
148
|
+
try {
|
|
149
|
+
await oxyServices.unblockUser(userId);
|
|
150
|
+
setBlockedUsers(prev => prev.filter(u => {
|
|
151
|
+
const id = typeof u.blockedId === 'string' ? u.blockedId : u.blockedId._id;
|
|
152
|
+
return id !== userId;
|
|
153
|
+
}));
|
|
154
|
+
toast.success(t('privacySettings.userUnblocked') || 'User unblocked');
|
|
155
|
+
} catch (error) {
|
|
156
|
+
console.error('Failed to unblock user:', error);
|
|
157
|
+
toast.error(t('privacySettings.unblockError') || 'Failed to unblock user');
|
|
158
|
+
}
|
|
159
|
+
}, [oxyServices, t]);
|
|
130
160
|
|
|
131
161
|
const handleUnrestrict = useCallback(async (userId: string) => {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
|
|
162
|
+
if (!oxyServices) return;
|
|
163
|
+
try {
|
|
164
|
+
await oxyServices.unrestrictUser(userId);
|
|
165
|
+
setRestrictedUsers(prev => prev.filter(u => {
|
|
166
|
+
const id = typeof u.restrictedId === 'string' ? u.restrictedId : u.restrictedId._id;
|
|
167
|
+
return id !== userId;
|
|
168
|
+
}));
|
|
169
|
+
toast.success(t('privacySettings.userUnrestricted') || 'User unrestricted');
|
|
170
|
+
} catch (error) {
|
|
171
|
+
console.error('Failed to unrestrict user:', error);
|
|
172
|
+
toast.error(t('privacySettings.unrestrictError') || 'Failed to unrestrict user');
|
|
173
|
+
}
|
|
174
|
+
}, [oxyServices, t]);
|
|
141
175
|
|
|
142
176
|
// Helper to extract user info from blocked/restricted objects
|
|
143
177
|
const extractUserInfo = useCallback((
|
|
@@ -121,7 +121,7 @@ const ProfileScreen: React.FC<ProfileScreenProps> = ({ userId, username, theme,
|
|
|
121
121
|
id: `existing-${index}`
|
|
122
122
|
}));
|
|
123
123
|
setLinks(linksWithMetadata);
|
|
124
|
-
} else if (profileRes.website
|
|
124
|
+
} else if (profileRes.website) {
|
|
125
125
|
setLinks([{
|
|
126
126
|
url: profileRes.website,
|
|
127
127
|
title: profileRes.website.replace(/^https?:\/\//, '').replace(/\/$/, ''),
|
|
@@ -252,32 +252,32 @@ const ProfileScreen: React.FC<ProfileScreenProps> = ({ userId, username, theme,
|
|
|
252
252
|
|
|
253
253
|
{/* Info Grid Row */}
|
|
254
254
|
<View style={styles.infoGrid}>
|
|
255
|
-
{profile?.createdAt
|
|
255
|
+
{profile?.createdAt && (
|
|
256
256
|
<View style={styles.infoGridItem}>
|
|
257
257
|
<Ionicons name="calendar-outline" size={16} color={colors.secondaryText} style={{ marginRight: 6 }} />
|
|
258
258
|
<Text style={[styles.infoGridText, { color: colors.secondaryText }]}>
|
|
259
259
|
{t('profile.joinedOn', { date: new Date(profile.createdAt).toLocaleDateString() }) || `Joined ${new Date(profile.createdAt).toLocaleDateString()}`}
|
|
260
260
|
</Text>
|
|
261
261
|
</View>
|
|
262
|
-
)
|
|
263
|
-
{profile?.location &&
|
|
262
|
+
)}
|
|
263
|
+
{profile?.location && (
|
|
264
264
|
<View style={styles.infoGridItem}>
|
|
265
265
|
<Ionicons name="location-outline" size={16} color={colors.secondaryText} style={{ marginRight: 6 }} />
|
|
266
266
|
<Text style={[styles.infoGridText, { color: colors.secondaryText }]} numberOfLines={1}>{profile.location}</Text>
|
|
267
267
|
</View>
|
|
268
|
-
)
|
|
269
|
-
{profile?.website &&
|
|
268
|
+
)}
|
|
269
|
+
{profile?.website && (
|
|
270
270
|
<View style={styles.infoGridItem}>
|
|
271
271
|
<Ionicons name="globe-outline" size={16} color={colors.secondaryText} style={{ marginRight: 6 }} />
|
|
272
272
|
<Text style={[styles.infoGridText, { color: colors.secondaryText }]} numberOfLines={1}>{profile.website}</Text>
|
|
273
273
|
</View>
|
|
274
|
-
)
|
|
275
|
-
{profile && 'company' in profile && typeof profile.company === 'string' && profile.company
|
|
274
|
+
)}
|
|
275
|
+
{profile && 'company' in profile && typeof profile.company === 'string' && profile.company && (
|
|
276
276
|
<View style={styles.infoGridItem}>
|
|
277
277
|
<Ionicons name="business-outline" size={16} color={colors.secondaryText} style={{ marginRight: 6 }} />
|
|
278
|
-
<Text style={[styles.infoGridText, { color: colors.secondaryText }]} numberOfLines={1}>{profile.company
|
|
278
|
+
<Text style={[styles.infoGridText, { color: colors.secondaryText }]} numberOfLines={1}>{profile.company}</Text>
|
|
279
279
|
</View>
|
|
280
|
-
)
|
|
280
|
+
)}
|
|
281
281
|
{profile && 'jobTitle' in profile && typeof profile.jobTitle === 'string' && profile.jobTitle && (
|
|
282
282
|
<View style={styles.infoGridItem}>
|
|
283
283
|
<Ionicons name="briefcase-outline" size={16} color={colors.secondaryText} style={{ marginRight: 6 }} />
|
|
@@ -1,84 +1,44 @@
|
|
|
1
1
|
import { create } from 'zustand';
|
|
2
|
-
import type { User } from '../../models/interfaces';
|
|
3
2
|
|
|
4
3
|
export interface AuthState {
|
|
5
|
-
user: User | null;
|
|
6
4
|
isAuthenticated: boolean;
|
|
7
5
|
isLoading: boolean;
|
|
8
6
|
error: string | null;
|
|
9
|
-
lastUserFetch: number | null; // Timestamp of last user fetch for caching
|
|
10
7
|
|
|
11
8
|
// Identity sync state (offline-first)
|
|
12
9
|
isIdentitySynced: boolean;
|
|
13
10
|
isSyncing: boolean;
|
|
14
11
|
|
|
15
|
-
loginSuccess: (
|
|
12
|
+
loginSuccess: () => void;
|
|
16
13
|
loginFailure: (error: string) => void;
|
|
17
14
|
logout: () => void;
|
|
18
|
-
fetchUser: (oxyServices: { getCurrentUser: () => Promise<User> }, forceRefresh?: boolean) => Promise<void>;
|
|
19
|
-
setUser: (user: User) => void; // Direct user setter for caching
|
|
20
15
|
|
|
21
16
|
// Identity sync actions
|
|
22
17
|
setIdentitySynced: (synced: boolean) => void;
|
|
23
18
|
setSyncing: (syncing: boolean) => void;
|
|
24
19
|
}
|
|
25
20
|
|
|
26
|
-
export const useAuthStore = create<AuthState>((set: (state: Partial<AuthState>) => void
|
|
27
|
-
user: null,
|
|
21
|
+
export const useAuthStore = create<AuthState>((set: (state: Partial<AuthState>) => void) => ({
|
|
28
22
|
isAuthenticated: false,
|
|
29
23
|
isLoading: false,
|
|
30
24
|
error: null,
|
|
31
|
-
lastUserFetch: null,
|
|
32
25
|
|
|
33
26
|
// Identity sync state (offline-first)
|
|
34
|
-
isIdentitySynced:
|
|
27
|
+
isIdentitySynced: false, // Registration/identity sync not confirmed until done
|
|
35
28
|
isSyncing: false,
|
|
36
29
|
|
|
37
|
-
loginSuccess: (
|
|
30
|
+
loginSuccess: () => set({
|
|
38
31
|
isLoading: false,
|
|
39
|
-
isAuthenticated: true,
|
|
40
|
-
|
|
41
|
-
lastUserFetch: Date.now(),
|
|
42
|
-
isIdentitySynced: true, // If login succeeded, identity is synced
|
|
32
|
+
isAuthenticated: true,
|
|
33
|
+
isIdentitySynced: true, // If login succeeded, registration is complete
|
|
43
34
|
}),
|
|
44
35
|
loginFailure: (error: string) => set({ isLoading: false, error }),
|
|
45
36
|
logout: () => set({
|
|
46
|
-
|
|
47
|
-
isAuthenticated: false,
|
|
48
|
-
lastUserFetch: null,
|
|
49
|
-
// Reset identity sync state when logging out (for accounts app, identity = account)
|
|
50
|
-
isIdentitySynced: false,
|
|
37
|
+
isAuthenticated: false,
|
|
51
38
|
isSyncing: false,
|
|
52
39
|
}),
|
|
53
|
-
setUser: (user: User) => set({ user, lastUserFetch: Date.now() }),
|
|
54
40
|
|
|
55
41
|
// Identity sync actions
|
|
56
42
|
setIdentitySynced: (synced: boolean) => set({ isIdentitySynced: synced }),
|
|
57
43
|
setSyncing: (syncing: boolean) => set({ isSyncing: syncing }),
|
|
58
|
-
|
|
59
|
-
const state = get();
|
|
60
|
-
const now = Date.now();
|
|
61
|
-
const cacheAge = state.lastUserFetch ? now - state.lastUserFetch : Number.POSITIVE_INFINITY;
|
|
62
|
-
const cacheValid = cacheAge < 5 * 60 * 1000; // 5 minutes cache
|
|
63
|
-
|
|
64
|
-
// Use cached data if available and not forcing refresh
|
|
65
|
-
if (!forceRefresh && state.user && cacheValid) {
|
|
66
|
-
if (__DEV__) {
|
|
67
|
-
console.log('AuthStore: Using cached user data (age:', cacheAge, 'ms)');
|
|
68
|
-
}
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
set({ isLoading: true, error: null });
|
|
73
|
-
try {
|
|
74
|
-
const user = await oxyServices.getCurrentUser();
|
|
75
|
-
set({ user, isLoading: false, isAuthenticated: true, lastUserFetch: now });
|
|
76
|
-
} catch (error) {
|
|
77
|
-
const errorMessage = error instanceof Error ? error.message : 'Failed to fetch user';
|
|
78
|
-
if (__DEV__) {
|
|
79
|
-
console.error('AuthStore: Error fetching user:', error);
|
|
80
|
-
}
|
|
81
|
-
set({ error: errorMessage, isLoading: false });
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
}));
|
|
44
|
+
}));
|