From fc9a800eb21e60deea815bdd0e39b8bcf2f059f9 Mon Sep 17 00:00:00 2001 From: KirillKirill Date: Mon, 17 Aug 2026 13:51:57 +0300 Subject: [PATCH 1/7] chore: remove unused files and exports; clean up some types --- .../src/api/authorized-http-api-client.ts | 2 +- .../worker/views/sign-up-worker.page.tsx | 4 +-- .../src/modules/smart-contracts/chains.ts | 36 +++---------------- .../components/mobile/my-jobs-card-mobile.tsx | 5 +-- .../worker/profile/components/index.ts | 2 -- .../profile/components/profile-data.tsx | 3 +- .../data-entry/input-masks/human-currency.tsx | 8 +---- .../data-entry/input-masks/index.ts | 2 -- .../data-entry/input-masks/percents.tsx | 8 +---- .../shared/components/data-entry/input.tsx | 3 +- .../components/hcaptcha/h-captcha-form.tsx | 2 +- .../shared/components/hcaptcha/h-captcha.tsx | 4 +-- .../shared/contexts/generic-auth-context.tsx | 5 +-- .../shared/contexts/jwt-expiration-check.tsx | 10 ++---- .../src/shared/contexts/modal-context.tsx | 13 ++++--- .../wallet-connect/wallet-connect.tsx | 12 +++---- .../frontend/src/shared/errors/handlers.ts | 9 ----- .../frontend/src/shared/errors/index.ts | 1 - .../src/shared/services/signature.service.ts | 2 +- .../src/shared/services/ui-config.service.ts | 2 +- 20 files changed, 39 insertions(+), 94 deletions(-) delete mode 100644 packages/apps/human-app/frontend/src/modules/worker/profile/components/index.ts delete mode 100644 packages/apps/human-app/frontend/src/shared/errors/handlers.ts diff --git a/packages/apps/human-app/frontend/src/api/authorized-http-api-client.ts b/packages/apps/human-app/frontend/src/api/authorized-http-api-client.ts index 92a427d161..4907c45090 100644 --- a/packages/apps/human-app/frontend/src/api/authorized-http-api-client.ts +++ b/packages/apps/human-app/frontend/src/api/authorized-http-api-client.ts @@ -6,7 +6,7 @@ import { } from './http-api-client'; import { AuthService, type AuthProvider } from './auth-service'; -export class AuthorizedHttpApiClient extends HttpApiClient { +class AuthorizedHttpApiClient extends HttpApiClient { constructor( baseUrl: string, private readonly authProvider: AuthProvider diff --git a/packages/apps/human-app/frontend/src/modules/signup/worker/views/sign-up-worker.page.tsx b/packages/apps/human-app/frontend/src/modules/signup/worker/views/sign-up-worker.page.tsx index c36f7e1482..7a9b66bf4e 100644 --- a/packages/apps/human-app/frontend/src/modules/signup/worker/views/sign-up-worker.page.tsx +++ b/packages/apps/human-app/frontend/src/modules/signup/worker/views/sign-up-worker.page.tsx @@ -1,4 +1,4 @@ -import { useEffect } from 'react'; +import { useEffect, type SubmitEvent } from 'react'; import { FormProvider, useForm } from 'react-hook-form'; import { Link as RouterLink, useNavigate } from 'react-router-dom'; import { zodResolver } from '@hookform/resolvers/zod'; @@ -65,7 +65,7 @@ export function SignUpPage() { navigate(-1); }; - const handleSubmit = (event: React.FormEvent) => { + const handleSubmit = (event: SubmitEvent) => { void methods.handleSubmit(signUp)(event); }; diff --git a/packages/apps/human-app/frontend/src/modules/smart-contracts/chains.ts b/packages/apps/human-app/frontend/src/modules/smart-contracts/chains.ts index 7666fcd23d..8f79e50d7e 100644 --- a/packages/apps/human-app/frontend/src/modules/smart-contracts/chains.ts +++ b/packages/apps/human-app/frontend/src/modules/smart-contracts/chains.ts @@ -5,14 +5,13 @@ // function import { ChainId } from '@human-protocol/sdk/src/enums'; import { NETWORKS } from '@human-protocol/sdk/src/constants'; -import { env } from '@/shared/env'; import { MainnetContracts, TestnetContracts, type ContractsAddresses, } from '@/modules/smart-contracts/contracts'; -export interface Chain { +interface Chain { explorerUrl: string; name: string; chainId: number; @@ -23,22 +22,22 @@ export type ChainWithAddresses = Chain & { addresses: ContractsAddresses; }; -export const TestnetChainsIds = [ +const TestnetChainsIds = [ ChainId.POLYGON_AMOY, ChainId.SEPOLIA, ChainId.BSC_TESTNET, ChainId.LOCALHOST, ] as const; -export const MainnetChainsIds = [ +const MainnetChainsIds = [ ChainId.POLYGON, ChainId.MAINNET, ChainId.BSC_MAINNET, ChainId.ALL, ] as const; -export type TestnetNarrow = Exclude; -export type MainnetNarrow = Exclude; +type TestnetNarrow = Exclude; +type MainnetNarrow = Exclude; export const TestnetChains: readonly ChainWithAddresses[] = [ { @@ -87,28 +86,3 @@ function getChainConfigsForChainIds( } return result; } - -const handleFilterChains = ( - chainsArr: ChainWithAddresses[], - chainIdsEnabled: number[] -) => { - return chainsArr.filter((chain) => - chainIdsEnabled.some((el) => el === chain.chainId) - ); -}; - -export const getTestnetChainsEnabled = (chainIdsEnabled: number[]) => { - return handleFilterChains(AllTestnetsChains, chainIdsEnabled); -}; - -export const getMainnetChainsEnabled = (chainIdsEnabled: number[]) => { - return handleFilterChains(AllMainnetChains, chainIdsEnabled); -}; - -export const getEnabledChainsByUiConfig = ( - chainIdsEnabled: number[] -): Chain[] => - (env.VITE_NETWORK === 'mainnet' - ? getMainnetChainsEnabled(chainIdsEnabled) - : getTestnetChainsEnabled(chainIdsEnabled) - ).map(({ addresses: _, ...chainData }) => chainData); diff --git a/packages/apps/human-app/frontend/src/modules/worker/jobs/my-jobs/components/mobile/my-jobs-card-mobile.tsx b/packages/apps/human-app/frontend/src/modules/worker/jobs/my-jobs/components/mobile/my-jobs-card-mobile.tsx index 62e5356d7b..1d835fe187 100644 --- a/packages/apps/human-app/frontend/src/modules/worker/jobs/my-jobs/components/mobile/my-jobs-card-mobile.tsx +++ b/packages/apps/human-app/frontend/src/modules/worker/jobs/my-jobs/components/mobile/my-jobs-card-mobile.tsx @@ -1,3 +1,4 @@ +import { type ReactNode } from 'react'; import { Chip, Paper, Stack, Typography } from '@mui/material'; import { useTranslation } from 'react-i18next'; @@ -23,8 +24,8 @@ const Row = ({ children, }: { label: string; - icon: React.ReactNode; - children: React.ReactNode; + icon: ReactNode; + children: ReactNode; }) => { return ( void; name: string; } -export type InputMaskComponent = ForwardRefExoticComponent< - CustomProps & RefAttributes ->; - export const HumanCurrencyInputMask = forwardRef< NumericFormatProps, CustomProps diff --git a/packages/apps/human-app/frontend/src/shared/components/data-entry/input-masks/index.ts b/packages/apps/human-app/frontend/src/shared/components/data-entry/input-masks/index.ts index 675216357f..58cc5d4298 100644 --- a/packages/apps/human-app/frontend/src/shared/components/data-entry/input-masks/index.ts +++ b/packages/apps/human-app/frontend/src/shared/components/data-entry/input-masks/index.ts @@ -4,5 +4,3 @@ import { PercentsInputMask } from '@/shared/components/data-entry/input-masks/pe export type InputMask = | typeof HumanCurrencyInputMask | typeof PercentsInputMask; - -export { HumanCurrencyInputMask, PercentsInputMask }; diff --git a/packages/apps/human-app/frontend/src/shared/components/data-entry/input-masks/percents.tsx b/packages/apps/human-app/frontend/src/shared/components/data-entry/input-masks/percents.tsx index 2985abf67d..6fe8cc1cc0 100644 --- a/packages/apps/human-app/frontend/src/shared/components/data-entry/input-masks/percents.tsx +++ b/packages/apps/human-app/frontend/src/shared/components/data-entry/input-masks/percents.tsx @@ -1,18 +1,12 @@ import { t } from 'i18next'; -import type { ForwardRefExoticComponent, RefAttributes } from 'react'; import { forwardRef } from 'react'; -import type { NumericFormatProps } from 'react-number-format'; -import { NumericFormat } from 'react-number-format'; +import { NumericFormat, type NumericFormatProps } from 'react-number-format'; interface CustomProps { onChange: (event: { target: { name: string; value: string } }) => void; name: string; } -export type InputMaskComponent = ForwardRefExoticComponent< - CustomProps & RefAttributes ->; - export const PercentsInputMask = forwardRef( function NumericFormatCustom(props, ref) { const { onChange, ...other } = props; diff --git a/packages/apps/human-app/frontend/src/shared/components/data-entry/input.tsx b/packages/apps/human-app/frontend/src/shared/components/data-entry/input.tsx index 49ff1cf5d1..a232c51896 100644 --- a/packages/apps/human-app/frontend/src/shared/components/data-entry/input.tsx +++ b/packages/apps/human-app/frontend/src/shared/components/data-entry/input.tsx @@ -1,3 +1,4 @@ +import { type ReactNode } from 'react'; import { Controller } from 'react-hook-form'; import { type TextFieldProps, TextField, Typography } from '@mui/material'; @@ -8,7 +9,7 @@ export interface InputProps extends OmittedProps { name: string; label?: string; autoComplete?: string; - customError?: React.ReactNode; + customError?: ReactNode; mask?: InputMask; } diff --git a/packages/apps/human-app/frontend/src/shared/components/hcaptcha/h-captcha-form.tsx b/packages/apps/human-app/frontend/src/shared/components/hcaptcha/h-captcha-form.tsx index e1821ee9f1..acc69b60d5 100644 --- a/packages/apps/human-app/frontend/src/shared/components/hcaptcha/h-captcha-form.tsx +++ b/packages/apps/human-app/frontend/src/shared/components/hcaptcha/h-captcha-form.tsx @@ -10,7 +10,7 @@ interface HCaptchaFormProps { error?: unknown; } -export function HCaptchaForm({ name, error }: Readonly) { +export function HCaptchaForm({ name, error }: HCaptchaFormProps) { const { setValue, formState } = useFormContext>(); const customCaptchaRef = useRef(null); diff --git a/packages/apps/human-app/frontend/src/shared/components/hcaptcha/h-captcha.tsx b/packages/apps/human-app/frontend/src/shared/components/hcaptcha/h-captcha.tsx index f548c4c862..8189fb030e 100644 --- a/packages/apps/human-app/frontend/src/shared/components/hcaptcha/h-captcha.tsx +++ b/packages/apps/human-app/frontend/src/shared/components/hcaptcha/h-captcha.tsx @@ -1,4 +1,4 @@ -import { forwardRef, useImperativeHandle, useRef } from 'react'; +import { forwardRef, useImperativeHandle, useRef, type Ref } from 'react'; import HCaptcha from '@hcaptcha/react-hcaptcha'; import { env } from '@/shared/env'; @@ -12,7 +12,7 @@ interface CustomHCaptchaProps { function InternalHCaptcha( { onVerify }: CustomHCaptchaProps, - ref: React.Ref + ref: Ref ) { const captchaRef = useRef(null); diff --git a/packages/apps/human-app/frontend/src/shared/contexts/generic-auth-context.tsx b/packages/apps/human-app/frontend/src/shared/contexts/generic-auth-context.tsx index 15b5158301..e2f5955298 100644 --- a/packages/apps/human-app/frontend/src/shared/contexts/generic-auth-context.tsx +++ b/packages/apps/human-app/frontend/src/shared/contexts/generic-auth-context.tsx @@ -1,7 +1,8 @@ -import React, { createContext, useState, useEffect } from 'react'; +import { createContext, useState, useEffect, type ReactNode } from 'react'; import { jwtDecode } from 'jwt-decode'; import { type ZodType } from 'zod'; import { useQueryClient } from '@tanstack/react-query'; + import { browserAuthProvider } from '@/shared/contexts/browser-auth-provider'; import { type AuthTokensSuccessResponse } from '@/shared/schemas'; import { type UserData } from '@/modules/auth/context/auth-context'; @@ -37,7 +38,7 @@ export function createAuthProvider(config: { AuthenticatedUserContextType | UnauthenticatedUserContextType | null >(null); - function AuthProvider({ children }: Readonly<{ children: React.ReactNode }>) { + function AuthProvider({ children }: { children: ReactNode }) { const queryClient = useQueryClient(); const [authState, setAuthState] = useState<{ user: T | null; diff --git a/packages/apps/human-app/frontend/src/shared/contexts/jwt-expiration-check.tsx b/packages/apps/human-app/frontend/src/shared/contexts/jwt-expiration-check.tsx index 7c4f920abc..e079390ba0 100644 --- a/packages/apps/human-app/frontend/src/shared/contexts/jwt-expiration-check.tsx +++ b/packages/apps/human-app/frontend/src/shared/contexts/jwt-expiration-check.tsx @@ -1,14 +1,10 @@ -import type React from 'react'; -import { useEffect, useRef } from 'react'; +import { useEffect, useRef, type ReactNode } from 'react'; import { useLocation } from 'react-router-dom'; + import { useAccessTokenRefresh } from '@/api/hooks/use-access-token-refresh'; import { useAuth } from '@/modules/auth/hooks/use-auth'; -export function JWTExpirationCheck({ - children, -}: { - children: React.ReactElement; -}) { +export function JWTExpirationCheck({ children }: { children: ReactNode }) { const checksOnProfile = useRef(0); const auth = useAuth(); const location = useLocation(); diff --git a/packages/apps/human-app/frontend/src/shared/contexts/modal-context.tsx b/packages/apps/human-app/frontend/src/shared/contexts/modal-context.tsx index daf1e32eab..e415c802a3 100644 --- a/packages/apps/human-app/frontend/src/shared/contexts/modal-context.tsx +++ b/packages/apps/human-app/frontend/src/shared/contexts/modal-context.tsx @@ -1,4 +1,5 @@ -import React, { +import { + type ReactNode, createContext, useCallback, useContext, @@ -8,7 +9,7 @@ import React, { interface ModalContextType { open: boolean; - content: React.ReactNode; + content: ReactNode; showCloseButton: boolean; disableClose: boolean; openModal: ({ content, showCloseButton }: OpenModalProps) => void; @@ -18,17 +19,15 @@ interface ModalContextType { } interface OpenModalProps { - content: React.ReactNode; + content: ReactNode; showCloseButton?: boolean; } const ModalContext = createContext(undefined); -export function ModalProvider({ - children, -}: Readonly<{ children: React.ReactNode }>) { +export function ModalProvider({ children }: { children: ReactNode }) { const [open, setOpen] = useState(false); - const [content, setContent] = useState(null); + const [content, setContent] = useState(null); const [showCloseButton, setShowCloseButton] = useState(true); const [disableClose, setDisableClose] = useState(false); diff --git a/packages/apps/human-app/frontend/src/shared/contexts/wallet-connect/wallet-connect.tsx b/packages/apps/human-app/frontend/src/shared/contexts/wallet-connect/wallet-connect.tsx index 2f6c27d5e8..bb684e7fb1 100644 --- a/packages/apps/human-app/frontend/src/shared/contexts/wallet-connect/wallet-connect.tsx +++ b/packages/apps/human-app/frontend/src/shared/contexts/wallet-connect/wallet-connect.tsx @@ -1,9 +1,10 @@ -import React, { +import { createContext, useCallback, useEffect, useMemo, useState, + type ReactNode, } from 'react'; import { useAppKit, @@ -15,6 +16,7 @@ import { import { WagmiProvider } from 'wagmi'; import { WagmiAdapter } from '@reown/appkit-adapter-wagmi'; import { polygonAmoy, polygon } from '@reown/appkit/networks'; + import { env } from '@/shared/env'; import { useWeb3Provider } from '@/shared/hooks/use-web3-provider'; import { JsonRpcError } from '@/modules/smart-contracts/json-rpc-error'; @@ -52,7 +54,7 @@ export const WalletConnectContext = createContext< | null >(null); -function AppKitWrapper({ children }: { children: React.ReactNode }) { +function AppKitWrapper({ children }: { children: ReactNode }) { const [initializing, setInitializing] = useState(true); const web3ProviderMutation = useWeb3Provider(); const { open } = useAppKit(); @@ -125,11 +127,7 @@ function AppKitWrapper({ children }: { children: React.ReactNode }) { ); } -export function WalletConnectProvider({ - children, -}: { - children: React.ReactNode; -}) { +export function WalletConnectProvider({ children }: { children: ReactNode }) { return ( {children} diff --git a/packages/apps/human-app/frontend/src/shared/errors/handlers.ts b/packages/apps/human-app/frontend/src/shared/errors/handlers.ts deleted file mode 100644 index 671633a5c5..0000000000 --- a/packages/apps/human-app/frontend/src/shared/errors/handlers.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { t } from 'i18next'; -import { JsonRpcError } from '@/modules/smart-contracts/json-rpc-error'; - -export function jsonRpcErrorHandler(unknownError: unknown) { - if (unknownError instanceof JsonRpcError) { - return unknownError.message; - } - return t('errors.unknown'); -} diff --git a/packages/apps/human-app/frontend/src/shared/errors/index.ts b/packages/apps/human-app/frontend/src/shared/errors/index.ts index 20193c41fd..1a749c1e42 100644 --- a/packages/apps/human-app/frontend/src/shared/errors/index.ts +++ b/packages/apps/human-app/frontend/src/shared/errors/index.ts @@ -1,2 +1 @@ export * from './get-error-message-for-error'; -export * from './handlers'; diff --git a/packages/apps/human-app/frontend/src/shared/services/signature.service.ts b/packages/apps/human-app/frontend/src/shared/services/signature.service.ts index 27dc848e4e..be6d2f919a 100644 --- a/packages/apps/human-app/frontend/src/shared/services/signature.service.ts +++ b/packages/apps/human-app/frontend/src/shared/services/signature.service.ts @@ -27,7 +27,7 @@ const prepareSignatureSuccessSchema = z.object({ nonce: z.unknown(), }); -export type SignatureData = z.infer; +type SignatureData = z.infer; async function prepareSignature(data: PrepareSignatureBody) { try { diff --git a/packages/apps/human-app/frontend/src/shared/services/ui-config.service.ts b/packages/apps/human-app/frontend/src/shared/services/ui-config.service.ts index 0fadf37eaf..4343540456 100644 --- a/packages/apps/human-app/frontend/src/shared/services/ui-config.service.ts +++ b/packages/apps/human-app/frontend/src/shared/services/ui-config.service.ts @@ -9,7 +9,7 @@ const uiConfigSchema = z.object({ chainIdsEnabled: z.array(z.number()), }); -export type UiConfig = z.infer; +type UiConfig = z.infer; async function getUiConfig() { try { From dae7a04aabe53add0331f09d3a1a5b04a641d7a0 Mon Sep 17 00:00:00 2001 From: KirillKirill Date: Mon, 17 Aug 2026 14:53:42 +0300 Subject: [PATCH 2/7] refactor: structure of signup, signin and verify-user modules --- packages/apps/human-app/frontend/src/api/auth-service.ts | 2 +- .../modules/signin/{worker => components}/sign-in-form.tsx | 2 +- .../human-app/frontend/src/modules/signin/hooks/index.ts | 4 ---- .../modules/signin/{worker => hooks}/use-sign-in-mutation.ts | 2 +- .../src/modules/signin/{worker => hooks}/use-sign-in.tsx | 3 ++- .../frontend/src/modules/signin/{worker => }/schemas.ts | 0 .../src/modules/signin/{worker => }/sign-in.page.tsx | 4 ++-- .../human-app/frontend/src/modules/signin/worker/index.ts | 2 -- .../signup/{worker => }/hooks/use-sign-up-mutation.ts | 0 .../modules/signup/{worker => }/hooks/use-sign-up-worker.tsx | 0 .../frontend/src/modules/signup/{worker => }/schema.ts | 0 .../frontend/src/modules/signup/services/signup.service.ts | 2 +- .../views/sign-up-worker.page.tsx => sign-up.page.tsx} | 4 ++-- .../human-app/frontend/src/modules/signup/worker/index.ts | 1 - .../components}/identity-verification-control.tsx | 2 +- .../components}/register-address-btn.tsx | 0 .../worker => verify-user/components}/verification-flow.tsx | 0 .../components}/wallet-connection-control.tsx | 3 ++- .../hooks/use-register-address-notifications.tsx | 0 .../{signin => verify-user}/hooks/use-register-address.ts | 5 +++-- .../{signin => verify-user}/hooks/use-start-idv-mutation.ts | 5 +++-- .../modules/{signin => verify-user}/hooks/use-start-idv.ts | 0 .../services/verify-user.service.ts} | 0 .../{signin/worker => verify-user}/verify-user.page.tsx | 2 +- packages/apps/human-app/frontend/src/router/routes.tsx | 5 +++-- 25 files changed, 23 insertions(+), 25 deletions(-) rename packages/apps/human-app/frontend/src/modules/signin/{worker => components}/sign-in-form.tsx (98%) delete mode 100644 packages/apps/human-app/frontend/src/modules/signin/hooks/index.ts rename packages/apps/human-app/frontend/src/modules/signin/{worker => hooks}/use-sign-in-mutation.ts (92%) rename packages/apps/human-app/frontend/src/modules/signin/{worker => hooks}/use-sign-in.tsx (94%) rename packages/apps/human-app/frontend/src/modules/signin/{worker => }/schemas.ts (100%) rename packages/apps/human-app/frontend/src/modules/signin/{worker => }/sign-in.page.tsx (97%) delete mode 100644 packages/apps/human-app/frontend/src/modules/signin/worker/index.ts rename packages/apps/human-app/frontend/src/modules/signup/{worker => }/hooks/use-sign-up-mutation.ts (100%) rename packages/apps/human-app/frontend/src/modules/signup/{worker => }/hooks/use-sign-up-worker.tsx (100%) rename packages/apps/human-app/frontend/src/modules/signup/{worker => }/schema.ts (100%) rename packages/apps/human-app/frontend/src/modules/signup/{worker/views/sign-up-worker.page.tsx => sign-up.page.tsx} (98%) delete mode 100644 packages/apps/human-app/frontend/src/modules/signup/worker/index.ts rename packages/apps/human-app/frontend/src/modules/{signin/worker => verify-user/components}/identity-verification-control.tsx (99%) rename packages/apps/human-app/frontend/src/modules/{signin/worker => verify-user/components}/register-address-btn.tsx (100%) rename packages/apps/human-app/frontend/src/modules/{signin/worker => verify-user/components}/verification-flow.tsx (100%) rename packages/apps/human-app/frontend/src/modules/{signin/worker => verify-user/components}/wallet-connection-control.tsx (93%) rename packages/apps/human-app/frontend/src/modules/{signin => verify-user}/hooks/use-register-address-notifications.tsx (100%) rename packages/apps/human-app/frontend/src/modules/{signin => verify-user}/hooks/use-register-address.ts (93%) rename packages/apps/human-app/frontend/src/modules/{signin => verify-user}/hooks/use-start-idv-mutation.ts (66%) rename packages/apps/human-app/frontend/src/modules/{signin => verify-user}/hooks/use-start-idv.ts (100%) rename packages/apps/human-app/frontend/src/modules/{signin/services/profile.service.ts => verify-user/services/verify-user.service.ts} (100%) rename packages/apps/human-app/frontend/src/modules/{signin/worker => verify-user}/verify-user.page.tsx (96%) diff --git a/packages/apps/human-app/frontend/src/api/auth-service.ts b/packages/apps/human-app/frontend/src/api/auth-service.ts index f54a1a49c5..967ca6c662 100644 --- a/packages/apps/human-app/frontend/src/api/auth-service.ts +++ b/packages/apps/human-app/frontend/src/api/auth-service.ts @@ -1,5 +1,5 @@ import { jwtDecode } from 'jwt-decode'; -import { type SignInDto } from '@/modules/signin/worker/schemas'; +import { type SignInDto } from '@/modules/signin/schemas'; import { browserAuthProvider } from '@/shared/contexts/browser-auth-provider'; import { type AuthTokensSuccessResponse, diff --git a/packages/apps/human-app/frontend/src/modules/signin/worker/sign-in-form.tsx b/packages/apps/human-app/frontend/src/modules/signin/components/sign-in-form.tsx similarity index 98% rename from packages/apps/human-app/frontend/src/modules/signin/worker/sign-in-form.tsx rename to packages/apps/human-app/frontend/src/modules/signin/components/sign-in-form.tsx index 6e996acc33..03e6c3b58b 100644 --- a/packages/apps/human-app/frontend/src/modules/signin/worker/sign-in-form.tsx +++ b/packages/apps/human-app/frontend/src/modules/signin/components/sign-in-form.tsx @@ -11,7 +11,7 @@ import { Password } from '@/shared/components/data-entry/password'; import { useResetMutationErrors } from '@/shared/hooks/use-reset-mutation-errors'; import { HCaptchaForm } from '@/shared/components/hcaptcha'; import { routerPaths } from '@/router/router-paths'; -import { type SignInDto, signInDtoSchema } from './schemas'; +import { type SignInDto, signInDtoSchema } from '../schemas'; interface SignInFormProps { onSubmit: (data: SignInDto) => void; diff --git a/packages/apps/human-app/frontend/src/modules/signin/hooks/index.ts b/packages/apps/human-app/frontend/src/modules/signin/hooks/index.ts deleted file mode 100644 index cda829b154..0000000000 --- a/packages/apps/human-app/frontend/src/modules/signin/hooks/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from './use-start-idv'; -export * from './use-start-idv-mutation'; -export * from './use-register-address'; -export * from './use-register-address-notifications'; diff --git a/packages/apps/human-app/frontend/src/modules/signin/worker/use-sign-in-mutation.ts b/packages/apps/human-app/frontend/src/modules/signin/hooks/use-sign-in-mutation.ts similarity index 92% rename from packages/apps/human-app/frontend/src/modules/signin/worker/use-sign-in-mutation.ts rename to packages/apps/human-app/frontend/src/modules/signin/hooks/use-sign-in-mutation.ts index cf75008640..ee2ea03125 100644 --- a/packages/apps/human-app/frontend/src/modules/signin/worker/use-sign-in-mutation.ts +++ b/packages/apps/human-app/frontend/src/modules/signin/hooks/use-sign-in-mutation.ts @@ -2,7 +2,7 @@ import { useMutation } from '@tanstack/react-query'; import { env } from '@/shared/env'; import { AuthService, HttpApiClient } from '@/api'; import { useAuth } from '@/modules/auth/hooks/use-auth'; -import { type SignInDto } from './schemas'; +import { type SignInDto } from '../schemas'; function signInMutationFn(data: SignInDto) { const httpClient = new HttpApiClient(env.VITE_API_URL); diff --git a/packages/apps/human-app/frontend/src/modules/signin/worker/use-sign-in.tsx b/packages/apps/human-app/frontend/src/modules/signin/hooks/use-sign-in.tsx similarity index 94% rename from packages/apps/human-app/frontend/src/modules/signin/worker/use-sign-in.tsx rename to packages/apps/human-app/frontend/src/modules/signin/hooks/use-sign-in.tsx index 477abd65c1..16698fbed9 100644 --- a/packages/apps/human-app/frontend/src/modules/signin/worker/use-sign-in.tsx +++ b/packages/apps/human-app/frontend/src/modules/signin/hooks/use-sign-in.tsx @@ -1,7 +1,8 @@ import { useEffect } from 'react'; + import { browserAuthProvider } from '@/shared/contexts/browser-auth-provider'; import { useSignInMutation } from './use-sign-in-mutation'; -import { type SignInDto } from './schemas'; +import { type SignInDto } from '../schemas'; export function useSignIn() { const { diff --git a/packages/apps/human-app/frontend/src/modules/signin/worker/schemas.ts b/packages/apps/human-app/frontend/src/modules/signin/schemas.ts similarity index 100% rename from packages/apps/human-app/frontend/src/modules/signin/worker/schemas.ts rename to packages/apps/human-app/frontend/src/modules/signin/schemas.ts diff --git a/packages/apps/human-app/frontend/src/modules/signin/worker/sign-in.page.tsx b/packages/apps/human-app/frontend/src/modules/signin/sign-in.page.tsx similarity index 97% rename from packages/apps/human-app/frontend/src/modules/signin/worker/sign-in.page.tsx rename to packages/apps/human-app/frontend/src/modules/signin/sign-in.page.tsx index ca4c557482..f7f5655298 100644 --- a/packages/apps/human-app/frontend/src/modules/signin/worker/sign-in.page.tsx +++ b/packages/apps/human-app/frontend/src/modules/signin/sign-in.page.tsx @@ -5,8 +5,8 @@ import { Box, Grid, Typography } from '@mui/material'; import { getErrorMessageForError } from '@/shared/errors'; import { ApiClientError } from '@/api'; -import { useSignIn } from './use-sign-in'; -import { SignInForm } from './sign-in-form'; +import { useSignIn } from './hooks/use-sign-in'; +import { SignInForm } from './components/sign-in-form'; import signInImage from '@/assets/background-images/signin-background.png'; import { TopNotificationType, diff --git a/packages/apps/human-app/frontend/src/modules/signin/worker/index.ts b/packages/apps/human-app/frontend/src/modules/signin/worker/index.ts deleted file mode 100644 index 33eedcbea5..0000000000 --- a/packages/apps/human-app/frontend/src/modules/signin/worker/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './sign-in.page'; -export * from './verify-user.page'; diff --git a/packages/apps/human-app/frontend/src/modules/signup/worker/hooks/use-sign-up-mutation.ts b/packages/apps/human-app/frontend/src/modules/signup/hooks/use-sign-up-mutation.ts similarity index 100% rename from packages/apps/human-app/frontend/src/modules/signup/worker/hooks/use-sign-up-mutation.ts rename to packages/apps/human-app/frontend/src/modules/signup/hooks/use-sign-up-mutation.ts diff --git a/packages/apps/human-app/frontend/src/modules/signup/worker/hooks/use-sign-up-worker.tsx b/packages/apps/human-app/frontend/src/modules/signup/hooks/use-sign-up-worker.tsx similarity index 100% rename from packages/apps/human-app/frontend/src/modules/signup/worker/hooks/use-sign-up-worker.tsx rename to packages/apps/human-app/frontend/src/modules/signup/hooks/use-sign-up-worker.tsx diff --git a/packages/apps/human-app/frontend/src/modules/signup/worker/schema.ts b/packages/apps/human-app/frontend/src/modules/signup/schema.ts similarity index 100% rename from packages/apps/human-app/frontend/src/modules/signup/worker/schema.ts rename to packages/apps/human-app/frontend/src/modules/signup/schema.ts diff --git a/packages/apps/human-app/frontend/src/modules/signup/services/signup.service.ts b/packages/apps/human-app/frontend/src/modules/signup/services/signup.service.ts index f410015543..8910e4afb4 100644 --- a/packages/apps/human-app/frontend/src/modules/signup/services/signup.service.ts +++ b/packages/apps/human-app/frontend/src/modules/signup/services/signup.service.ts @@ -1,5 +1,5 @@ import { ApiClientError, humanAppApiClient } from '@/api'; -import { type SignUpDto } from '../worker/schema'; +import { type SignUpDto } from '../schema'; const signUpPath = '/auth/signup'; diff --git a/packages/apps/human-app/frontend/src/modules/signup/worker/views/sign-up-worker.page.tsx b/packages/apps/human-app/frontend/src/modules/signup/sign-up.page.tsx similarity index 98% rename from packages/apps/human-app/frontend/src/modules/signup/worker/views/sign-up-worker.page.tsx rename to packages/apps/human-app/frontend/src/modules/signup/sign-up.page.tsx index 7a9b66bf4e..df385f39c8 100644 --- a/packages/apps/human-app/frontend/src/modules/signup/worker/views/sign-up-worker.page.tsx +++ b/packages/apps/human-app/frontend/src/modules/signup/sign-up.page.tsx @@ -13,9 +13,9 @@ import { env } from '@/shared/env'; import { getErrorMessageForError } from '@/shared/errors'; import { HCaptchaForm } from '@/shared/components/hcaptcha'; import { useResetMutationErrors } from '@/shared/hooks/use-reset-mutation-errors'; -import { useSignUpWorker } from '@/modules/signup/worker/hooks/use-sign-up-worker'; +import { useSignUpWorker } from './hooks/use-sign-up-worker'; import { ApiClientError } from '@/api'; -import { signUpDtoSchema } from '../schema'; +import { signUpDtoSchema } from './schema'; import signUpImage from '@/assets/background-images/signup-background.png'; import { BackButton } from '@/shared/components/ui/page-card/back-button'; import { routerPaths } from '@/router/router-paths'; diff --git a/packages/apps/human-app/frontend/src/modules/signup/worker/index.ts b/packages/apps/human-app/frontend/src/modules/signup/worker/index.ts deleted file mode 100644 index 3c0e3dddf5..0000000000 --- a/packages/apps/human-app/frontend/src/modules/signup/worker/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './views/sign-up-worker.page'; diff --git a/packages/apps/human-app/frontend/src/modules/signin/worker/identity-verification-control.tsx b/packages/apps/human-app/frontend/src/modules/verify-user/components/identity-verification-control.tsx similarity index 99% rename from packages/apps/human-app/frontend/src/modules/signin/worker/identity-verification-control.tsx rename to packages/apps/human-app/frontend/src/modules/verify-user/components/identity-verification-control.tsx index 6647abf5be..e6661ecb9c 100644 --- a/packages/apps/human-app/frontend/src/modules/signin/worker/identity-verification-control.tsx +++ b/packages/apps/human-app/frontend/src/modules/verify-user/components/identity-verification-control.tsx @@ -3,7 +3,7 @@ import { useTranslation, Trans } from 'react-i18next'; import { Box, keyframes, Link, Stack, Typography } from '@mui/material'; import { jwtDecode } from 'jwt-decode'; -import { useStartIdv } from '../hooks'; +import { useStartIdv } from '../hooks/use-start-idv'; import { KycStatus } from '@/shared/types/entity.type'; import { env } from '@/shared/env'; import { HourglassIcon, VeriffIcon } from '@/shared/components/ui/icons'; diff --git a/packages/apps/human-app/frontend/src/modules/signin/worker/register-address-btn.tsx b/packages/apps/human-app/frontend/src/modules/verify-user/components/register-address-btn.tsx similarity index 100% rename from packages/apps/human-app/frontend/src/modules/signin/worker/register-address-btn.tsx rename to packages/apps/human-app/frontend/src/modules/verify-user/components/register-address-btn.tsx diff --git a/packages/apps/human-app/frontend/src/modules/signin/worker/verification-flow.tsx b/packages/apps/human-app/frontend/src/modules/verify-user/components/verification-flow.tsx similarity index 100% rename from packages/apps/human-app/frontend/src/modules/signin/worker/verification-flow.tsx rename to packages/apps/human-app/frontend/src/modules/verify-user/components/verification-flow.tsx diff --git a/packages/apps/human-app/frontend/src/modules/signin/worker/wallet-connection-control.tsx b/packages/apps/human-app/frontend/src/modules/verify-user/components/wallet-connection-control.tsx similarity index 93% rename from packages/apps/human-app/frontend/src/modules/signin/worker/wallet-connection-control.tsx rename to packages/apps/human-app/frontend/src/modules/verify-user/components/wallet-connection-control.tsx index af2b13f2ad..9d91d371ee 100644 --- a/packages/apps/human-app/frontend/src/modules/signin/worker/wallet-connection-control.tsx +++ b/packages/apps/human-app/frontend/src/modules/verify-user/components/wallet-connection-control.tsx @@ -1,8 +1,9 @@ import { useTranslation } from 'react-i18next'; import { Stack, Typography } from '@mui/material'; + +import { RegisterAddressBtn } from './register-address-btn'; import { Button } from '@/shared/components/ui/button'; import { useWalletConnect } from '@/shared/contexts/wallet-connect'; -import { RegisterAddressBtn } from '../worker/register-address-btn'; import { useAuth } from '@/modules/auth/hooks/use-auth'; export function WalletConnectionControl() { diff --git a/packages/apps/human-app/frontend/src/modules/signin/hooks/use-register-address-notifications.tsx b/packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-register-address-notifications.tsx similarity index 100% rename from packages/apps/human-app/frontend/src/modules/signin/hooks/use-register-address-notifications.tsx rename to packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-register-address-notifications.tsx diff --git a/packages/apps/human-app/frontend/src/modules/signin/hooks/use-register-address.ts b/packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-register-address.ts similarity index 93% rename from packages/apps/human-app/frontend/src/modules/signin/hooks/use-register-address.ts rename to packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-register-address.ts index 0dca7cb04e..569d4295b6 100644 --- a/packages/apps/human-app/frontend/src/modules/signin/hooks/use-register-address.ts +++ b/packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-register-address.ts @@ -1,11 +1,12 @@ import { useMutation } from '@tanstack/react-query'; import { t } from 'i18next'; + import { useAccessTokenRefresh } from '@/api/hooks/use-access-token-refresh'; import type { ResponseError } from '@/shared/types/global.type'; import { useWalletConnect } from '@/shared/contexts/wallet-connect'; import { usePrepareSignature } from '@/shared/hooks'; import { PrepareSignatureType } from '@/shared/services/signature.service'; -import * as profileService from '../services/profile.service'; +import * as verifyUserService from '../services/verify-user.service'; import { useAuth } from '@/modules/auth/hooks/use-auth'; interface RegisterAddressCallbacks { @@ -36,7 +37,7 @@ function useRegisterAddressMutation(callbacks: RegisterAddressCallbacks) { // wallet address is part of the JWT payload // so we need to refresh the token after the address is registered - await profileService.registerAddress({ address, chainId, signature }); + await verifyUserService.registerAddress({ address, chainId, signature }); await refreshAccessTokenAsync({}); updateUserData({ wallet_address: address, diff --git a/packages/apps/human-app/frontend/src/modules/signin/hooks/use-start-idv-mutation.ts b/packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-start-idv-mutation.ts similarity index 66% rename from packages/apps/human-app/frontend/src/modules/signin/hooks/use-start-idv-mutation.ts rename to packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-start-idv-mutation.ts index c64cb15770..433d2596b0 100644 --- a/packages/apps/human-app/frontend/src/modules/signin/hooks/use-start-idv-mutation.ts +++ b/packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-start-idv-mutation.ts @@ -1,12 +1,13 @@ import { useMutation } from '@tanstack/react-query'; -import * as profileService from '../services/profile.service'; + +import * as verifyUserService from '../services/verify-user.service'; import { useAuth } from '@/modules/auth/hooks/use-auth'; export function useIdvStartMutation() { const { user } = useAuth(); return useMutation({ - mutationFn: async () => profileService.startIdv(), + mutationFn: async () => verifyUserService.startIdv(), mutationKey: ['idvStart', user?.email], }); } diff --git a/packages/apps/human-app/frontend/src/modules/signin/hooks/use-start-idv.ts b/packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-start-idv.ts similarity index 100% rename from packages/apps/human-app/frontend/src/modules/signin/hooks/use-start-idv.ts rename to packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-start-idv.ts diff --git a/packages/apps/human-app/frontend/src/modules/signin/services/profile.service.ts b/packages/apps/human-app/frontend/src/modules/verify-user/services/verify-user.service.ts similarity index 100% rename from packages/apps/human-app/frontend/src/modules/signin/services/profile.service.ts rename to packages/apps/human-app/frontend/src/modules/verify-user/services/verify-user.service.ts diff --git a/packages/apps/human-app/frontend/src/modules/signin/worker/verify-user.page.tsx b/packages/apps/human-app/frontend/src/modules/verify-user/verify-user.page.tsx similarity index 96% rename from packages/apps/human-app/frontend/src/modules/signin/worker/verify-user.page.tsx rename to packages/apps/human-app/frontend/src/modules/verify-user/verify-user.page.tsx index 6fee0f4938..debb6a8b5c 100644 --- a/packages/apps/human-app/frontend/src/modules/signin/worker/verify-user.page.tsx +++ b/packages/apps/human-app/frontend/src/modules/verify-user/verify-user.page.tsx @@ -2,7 +2,7 @@ import { useEffect } from 'react'; import { Navigate, useNavigate } from 'react-router-dom'; import { Stack } from '@mui/material'; -import { VerificationFlow } from './verification-flow'; +import { VerificationFlow } from './components/verification-flow'; import { useAuth } from '@/modules/auth/hooks/use-auth'; import { routerPaths } from '@/router/router-paths'; import { KycStatus } from '@/shared/types/entity.type'; diff --git a/packages/apps/human-app/frontend/src/router/routes.tsx b/packages/apps/human-app/frontend/src/router/routes.tsx index fd7bb01d82..6586b68430 100644 --- a/packages/apps/human-app/frontend/src/router/routes.tsx +++ b/packages/apps/human-app/frontend/src/router/routes.tsx @@ -12,11 +12,12 @@ import { EmailVerificationProcessPage, VerifyEmailPage, } from '@/modules/worker/email-verification'; -import { SignInPage, VerifyUserPage } from '@/modules/signin/worker'; +import { SignInPage } from '@/modules/signin/sign-in.page'; +import { VerifyUserPage } from '@/modules/verify-user/verify-user.page'; import { JobsDiscoveryPage } from '@/modules/worker/jobs-discovery'; import { MyJobsPage } from '@/modules/worker/jobs/my-jobs/my-jobs.page'; import { ProfilePage } from '@/modules/worker/profile'; -import { SignUpPage } from '@/modules/signup/worker'; +import { SignUpPage } from '@/modules/signup/sign-up.page'; import { HomePage } from '@/modules/homepage'; import { ResetPasswordPage, From 408d7e553c47112e71cfa2ca7a633babda659022 Mon Sep 17 00:00:00 2001 From: KirillKirill Date: Mon, 17 Aug 2026 16:19:52 +0300 Subject: [PATCH 3/7] refactor: some namespaces of i18n --- .../signin/components/sign-in-form.tsx | 18 +-- .../src/modules/signin/sign-in.page.tsx | 4 +- .../src/modules/signup/sign-up.page.tsx | 23 ++- .../identity-verification-control.tsx | 16 +- .../components/register-address-btn.tsx | 2 +- .../components/verification-flow.tsx | 10 +- .../components/wallet-connection-control.tsx | 4 +- .../use-register-address-notifications.tsx | 2 +- .../frontend/src/shared/i18n/en.json | 138 ++++++++---------- 9 files changed, 94 insertions(+), 123 deletions(-) diff --git a/packages/apps/human-app/frontend/src/modules/signin/components/sign-in-form.tsx b/packages/apps/human-app/frontend/src/modules/signin/components/sign-in-form.tsx index 03e6c3b58b..230248a199 100644 --- a/packages/apps/human-app/frontend/src/modules/signin/components/sign-in-form.tsx +++ b/packages/apps/human-app/frontend/src/modules/signin/components/sign-in-form.tsx @@ -47,14 +47,10 @@ export function SignInForm({
- + @@ -67,7 +63,7 @@ export function SignInForm({ textDecoration: 'underline', }} > - {t('worker.signInForm.forgotPassword')} + {t('signInForm.forgotPassword')} @@ -78,7 +74,7 @@ export function SignInForm({ fullWidth loading={isLoading} > - {t('worker.signInForm.submitBtn')} + {t('signInForm.submitBtn')} @@ -93,7 +89,7 @@ export function SignInForm({ fontWeight: 700, }} > - {t('worker.signInForm.or')} + {t('signInForm.or')} - {t('worker.signInForm.dontHaveAccount')} + {t('signInForm.dontHaveAccount')} {' '} - {t('worker.signInForm.signUp')} + {t('signInForm.signUp')} diff --git a/packages/apps/human-app/frontend/src/modules/signin/sign-in.page.tsx b/packages/apps/human-app/frontend/src/modules/signin/sign-in.page.tsx index f7f5655298..179db6ec7e 100644 --- a/packages/apps/human-app/frontend/src/modules/signin/sign-in.page.tsx +++ b/packages/apps/human-app/frontend/src/modules/signin/sign-in.page.tsx @@ -23,7 +23,7 @@ function formattedSignInErrorMessage( unknownError: unknown ): string | undefined { if (unknownError instanceof ApiClientError && unknownError.status === 401) { - return t('worker.signInForm.errors.invalidCredentials'); + return t('signInForm.errors.invalidCredentials'); } } @@ -134,7 +134,7 @@ export function SignInPage() { variant="h4" sx={{ color: 'text.auxiliary100' }} > - {t('worker.signInForm.title')} + {t('signInForm.title')} - {t('worker.signUpForm.title')} + {t('signUpForm.title')} - + ), }} - i18nKey="worker.signUpForm.termsOfServiceAndPrivacyPolicy" + i18nKey="signUpForm.termsOfServiceAndPrivacyPolicy" /> @@ -161,7 +158,7 @@ export function SignUpPage() { fullWidth loading={isLoading} > - {t('worker.signUpForm.submitBtn')} + {t('signUpForm.submitBtn')} @@ -176,7 +173,7 @@ export function SignUpPage() { fontWeight: 700, }} > - {t('worker.signUpForm.or')} + {t('signUpForm.or')} - {t('worker.signUpForm.alreadyHaveAccount')} + {t('signUpForm.alreadyHaveAccount')} {' '} - {t('worker.signUpForm.signIn')} + {t('signUpForm.signIn')} diff --git a/packages/apps/human-app/frontend/src/modules/verify-user/components/identity-verification-control.tsx b/packages/apps/human-app/frontend/src/modules/verify-user/components/identity-verification-control.tsx index e6661ecb9c..6558d1eafb 100644 --- a/packages/apps/human-app/frontend/src/modules/verify-user/components/identity-verification-control.tsx +++ b/packages/apps/human-app/frontend/src/modules/verify-user/components/identity-verification-control.tsx @@ -113,7 +113,7 @@ export function IdentityVerificationControl({ components={{ 1: , }} - i18nKey="worker.profile.verificationDeclined" + i18nKey="verifyUser.verificationDeclined" /> ); @@ -135,7 +135,7 @@ export function IdentityVerificationControl({ }} > - {t('worker.profile.verificationOpenedInNewTab')} + {t('verifyUser.verificationOpenedInNewTab')} - {t('worker.profile.completeYourVerification')} + {t('verifyUser.completeYourVerification')} - {t('worker.profile.waitingForVerification')} + {t('verifyUser.waitingForVerification')} @@ -175,7 +175,7 @@ export function IdentityVerificationControl({ loading={isRefreshingAccessToken} onClick={handleCheckVerificationStatus} > - {t('worker.profile.checkVerificationStatus')} + {t('verifyUser.checkVerificationStatus')} @@ -188,7 +188,7 @@ export function IdentityVerificationControl({ variant="body4" sx={{ color: 'text.auxiliary200', mb: { xs: 3, md: 5 } }} > - {t('worker.profile.veriffCopy')} + {t('verifyUser.veriffCopy')} - {t('worker.profile.poweredBy')} + {t('verifyUser.poweredBy')} @@ -214,7 +214,7 @@ export function IdentityVerificationControl({ loading={idvStartIsPending} onClick={startIdv} > - {t('worker.profile.completeIdentityVerification')} + {t('verifyUser.completeIdentityVerification')} ); diff --git a/packages/apps/human-app/frontend/src/modules/verify-user/components/register-address-btn.tsx b/packages/apps/human-app/frontend/src/modules/verify-user/components/register-address-btn.tsx index a644e09cec..2479ece814 100644 --- a/packages/apps/human-app/frontend/src/modules/verify-user/components/register-address-btn.tsx +++ b/packages/apps/human-app/frontend/src/modules/verify-user/components/register-address-btn.tsx @@ -19,7 +19,7 @@ export function RegisterAddressBtn() { loading={isPending} onClick={mutate.bind(undefined, undefined)} > - {t('worker.profile.registerAddress')} + {t('verifyUser.registerAddress')} ); } diff --git a/packages/apps/human-app/frontend/src/modules/verify-user/components/verification-flow.tsx b/packages/apps/human-app/frontend/src/modules/verify-user/components/verification-flow.tsx index 2132065914..29fc8b94ce 100644 --- a/packages/apps/human-app/frontend/src/modules/verify-user/components/verification-flow.tsx +++ b/packages/apps/human-app/frontend/src/modules/verify-user/components/verification-flow.tsx @@ -35,9 +35,7 @@ export function VerificationFlow({ const kycStatus = user?.kyc_status as KycStatus; - const label = kycStatus - ? t(`worker.profile.idvStatusValues.${kycStatus}`) - : ''; + const label = kycStatus ? t(`verifyUser.idvStatusValues.${kycStatus}`) : ''; const isKycDeclined = kycStatus === KycStatus.DECLINED; const isKycStarted = kycStatus !== KycStatus.NONE; @@ -51,7 +49,7 @@ export function VerificationFlow({ variant="h4" sx={{ color: 'text.auxiliary100', mb: { xs: 2.5, md: 5 } }} > - {t('worker.profile.beforeWeGetStarted')} + {t('verifyUser.beforeWeGetStarted')} - {t('worker.profile.identityVerification')} + {t('verifyUser.identityVerification')} {isKycStarted && label && ( - {t('worker.profile.connectYourWallet')} + {t('verifyUser.connectYourWallet')} diff --git a/packages/apps/human-app/frontend/src/modules/verify-user/components/wallet-connection-control.tsx b/packages/apps/human-app/frontend/src/modules/verify-user/components/wallet-connection-control.tsx index 9d91d371ee..7affcb96d1 100644 --- a/packages/apps/human-app/frontend/src/modules/verify-user/components/wallet-connection-control.tsx +++ b/packages/apps/human-app/frontend/src/modules/verify-user/components/wallet-connection-control.tsx @@ -18,7 +18,7 @@ export function WalletConnectionControl() { - {t('worker.profile.walletAddressMessage')} + {t('verifyUser.walletAddressMessage')} ); @@ -31,7 +31,7 @@ export function WalletConnectionControl() { fullWidth onClick={() => void openModal()} > - {t('components.wallet.connectBtn.connect')} + {t('verifyUser.connectWallet')} ); } diff --git a/packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-register-address-notifications.tsx b/packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-register-address-notifications.tsx index 506e6e87c0..e1ba19f51a 100644 --- a/packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-register-address-notifications.tsx +++ b/packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-register-address-notifications.tsx @@ -12,7 +12,7 @@ export function useRegisterAddressNotifications() { const onSuccess = () => { showNotification({ type: TopNotificationType.SUCCESS, - message: t('worker.registerAddress.success'), + message: t('verifyUser.registerAddressSuccess'), }); }; const onError = (error: ResponseError) => { diff --git a/packages/apps/human-app/frontend/src/shared/i18n/en.json b/packages/apps/human-app/frontend/src/shared/i18n/en.json index d9f1bd89fe..0a27b86da3 100644 --- a/packages/apps/human-app/frontend/src/shared/i18n/en.json +++ b/packages/apps/human-app/frontend/src/shared/i18n/en.json @@ -15,27 +15,18 @@ "required": "Required", "min": "Password should have at least eight characters.", "max": "Max {{count}} characters", - "passwordWeak": "Password should be at least 8 characters long and contain at least one uppercase and one lowercase letter, one number and one special character", "passwordMismatch": "Passwords are not the same", "captcha": "Please complete the captcha", "passwordMissing": "Please enter your password.", "invalidEmail": "Please enter a valid email address.", - "invalidOracleAddress": "Invalid oracle address.", - "publicKeyLengthError": "Public key must be exactly 128 characters long", - "publicKeyHexadecimalStringError": "Public key must be a valid hexadecimal string", - "urlValidationError": "Invalid URL", - "feeValidationError": "Fee value must be an integer between 0 and 100", - "notANumber": "Not a number" + "invalidOracleAddress": "Invalid oracle address." }, "errors": { - "errorWithMessage": "Error with message: {{message}}", "errorWithStatusCode": "Error with status code: {{code}}", "unknown": "An error occurred, please try again.", - "unknownNetwork": "Unknown network", "jsonRpcError": "JSON-RPC error", "unsupportedNetwork": "Network selected in wallet is unsupported.", "unsupportedNetworkWithName": "Network '{{networkName}}' is unsupported.", - "invalidEscrowAddress": "Please enter a valid escrow address.", "noAddress": "No wallet address found.", "cannotSignMessage": "Cannot sign message." }, @@ -64,12 +55,6 @@ "humanProtocol": "HUMAN Protocol", "copyrightNote": "© 2021 HPF. HUMAN Protocol® is a registered trademark" }, - "wallet": { - "connectBtn": { - "disconnect": "Disconnect Wallet", - "connect": "Connect Wallet" - } - }, "pageCardError": { "reload": "Reload", "goHome": "Home Page" @@ -83,40 +68,66 @@ "signUp": "Sign Up", "signIn": "Sign In" }, - "worker": { - "signUpForm": { - "fields": { - "createPassword": "Create Password", - "password": "Create Password", - "confirmPassword": "Confirm Password", - "email": "your@email.com" - }, - "errors": { - "emailTaken": "Email is already taken. Please sign in." - }, - "title": "Sign Up", - "submitBtn": "Sign Up", - "passwordDetailedValidation": "Password must contain at least:", - "termsOfServiceAndPrivacyPolicy": "By clicking Sign Up, you agree to our <1>Terms of Service and that you have read our <2>Privacy Policy", - "or": "Or", - "alreadyHaveAccount": "Already have an account?", - "signIn": "Sign In" + "signUpForm": { + "fields": { + "createPassword": "Create Password", + "password": "Create Password", + "confirmPassword": "Confirm Password", + "email": "your@email.com" }, - "signInForm": { - "fields": { - "password": "Password", - "email": "your@email.com" - }, - "errors": { - "invalidCredentials": "Incorrect email or password!" - }, - "title": "Sign In", - "submitBtn": "Sign In", - "forgotPassword": "Forgot Password?", - "or": "Or", - "dontHaveAccount": "Don't have an account?", - "signUp": "Sign Up" + "errors": { + "emailTaken": "Email is already taken. Please sign in." + }, + "title": "Sign Up", + "submitBtn": "Sign Up", + "passwordDetailedValidation": "Password must contain at least:", + "termsOfServiceAndPrivacyPolicy": "By clicking Sign Up, you agree to our <1>Terms of Service and that you have read our <2>Privacy Policy", + "or": "Or", + "alreadyHaveAccount": "Already have an account?", + "signIn": "Sign In" + }, + "signInForm": { + "fields": { + "password": "Password", + "email": "your@email.com" + }, + "errors": { + "invalidCredentials": "Incorrect email or password!" }, + "title": "Sign In", + "submitBtn": "Sign In", + "forgotPassword": "Forgot Password?", + "or": "Or", + "dontHaveAccount": "Don't have an account?", + "signUp": "Sign Up" + }, + "verifyUser": { + "beforeWeGetStarted": "Before we get started", + "identityVerification": "Identity verification", + "connectYourWallet": "Connect your wallet", + "veriffCopy": "We use Veriff to verify your identity. You'll need: keep your phone & Government ID handy.", + "poweredBy": "Powered by", + "completeIdentityVerification": "Complete Identity Verification", + "verificationOpenedInNewTab": "Verification opened in a new tab", + "completeYourVerification": "Complete your verification there, then return here to continue", + "waitingForVerification": "Waiting for verification...", + "checkVerificationStatus": "Check Verification Status", + "verificationDeclined": "We were unable to verify your identity with the information provided. Please <1>contact support", + "walletAddressMessage": "This address is the wallet address where you will receive payments for completing tasks.", + "connectWallet": "Connect Wallet", + "registerAddress": "Register Address", + "registerAddressSuccess": "The address has been successfully registered.", + "idvStatusValues": { + "none": "Not Started", + "approved": "Completed", + "resubmission_requested": "Resubmission Required", + "declined": "Failed", + "review": "Under Review", + "expired": "Expired", + "abandoned": "Abandoned" + } + }, + "worker": { "verifyEmail": { "title": "Verify Email", "checkYourInbox": "Check your inbox", @@ -178,36 +189,8 @@ "walletAddress": "Wallet address", "resetPassword": "Reset Password", "logout": "Logout", - "beforeWeGetStarted": "Before we get started", - "identityVerification": "Identity verification", - "veriffCopy": "We use Veriff to verify your identity. You'll need: keep your phone & Government ID handy.", - "poweredBy": "Powered by", - "completeIdentityVerification": "Complete Identity Verification", - "verificationOpenedInNewTab": "Verification opened in a new tab", - "completeYourVerification": "Complete your verification there, then return here to continue", - "waitingForVerification": "Waiting for verification...", - "checkVerificationStatus": "Check Verification Status", - "verificationDeclined": "We were unable to verify your identity with the information provided. Please <1>contact support", - "confirmEmail": "Confirm email", - "walletAddressMessage": "This address is the wallet address where you will receive payments for completing tasks.", - "connectYourWallet": "Connect your wallet", - "connectWallet": "Connect Wallet", - "walletConnected": "Connected", - "addKYCInfoOnChain": "Add KYC Info On-chain", - "wrongWalletAddress": "Selected wallet address doesn't match the address assigned to the account.", - "registerAddress": "Register Address", - "emailNotifications": "Email Notifications", "topNotifications": { "completeSteps": "Please set up your profile by completing the steps below." - }, - "idvStatusValues": { - "none": "Not Started", - "approved": "Completed", - "resubmission_requested": "Resubmission Required", - "declined": "Failed", - "review": "Under Review", - "expired": "Expired", - "abandoned": "Abandoned" } }, "oraclesList": { @@ -312,9 +295,6 @@ "solvedSuccess": "HCaptcha solved!", "loadingLiveStatistics": "Loading live statistics" }, - "registerAddress": { - "success": "The address has been successfully registered." - }, "reportAbuse": { "modalHeader": "Report Abuse", "modalParagraph": "Notice something inappropriate or incorrect? Let us know if this task contains harmful, offensive, or misleading content. Your report will be reviewed confidentially.", From 9be351dfc91c5ec7f0c51105ac57a808a038b3fb Mon Sep 17 00:00:00 2001 From: Dmitry Nechay Date: Tue, 18 Aug 2026 12:58:58 +0300 Subject: [PATCH 4/7] [HUMAN App] feat: disable human app signup (#4008) Co-authored-by: KirillKirill --- .../modules/homepage/components/sign-in-section.tsx | 9 ++++++--- .../src/modules/signin/worker/sign-in-form.tsx | 6 +++--- .../components/email-verification-form-container.tsx | 2 +- .../apps/human-app/frontend/src/router/router-paths.ts | 2 +- packages/apps/human-app/frontend/src/router/routes.tsx | 10 +++++----- .../apps/human-app/frontend/src/shared/i18n/en.json | 2 ++ 6 files changed, 18 insertions(+), 13 deletions(-) diff --git a/packages/apps/human-app/frontend/src/modules/homepage/components/sign-in-section.tsx b/packages/apps/human-app/frontend/src/modules/homepage/components/sign-in-section.tsx index 7777bf8002..dc39b438bb 100644 --- a/packages/apps/human-app/frontend/src/modules/homepage/components/sign-in-section.tsx +++ b/packages/apps/human-app/frontend/src/modules/homepage/components/sign-in-section.tsx @@ -1,6 +1,6 @@ import { Link } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; -import { Paper, Button } from '@mui/material'; +import { Paper, Button, Typography } from '@mui/material'; import { routerPaths } from '@/router/router-paths'; @@ -21,7 +21,7 @@ export function SignInSection() { gap: 2, }} > - + */} + + {t('homepage.signUpClosed')} + ); } diff --git a/packages/apps/human-app/frontend/src/modules/signin/worker/sign-in-form.tsx b/packages/apps/human-app/frontend/src/modules/signin/worker/sign-in-form.tsx index 6e996acc33..1420bdaa36 100644 --- a/packages/apps/human-app/frontend/src/modules/signin/worker/sign-in-form.tsx +++ b/packages/apps/human-app/frontend/src/modules/signin/worker/sign-in-form.tsx @@ -1,6 +1,6 @@ import { type SubmitEvent } from 'react'; import { FormProvider, useForm } from 'react-hook-form'; -import { Box, Divider, Grid, Link as MuiLink, Typography } from '@mui/material'; +import { Box, Grid, Link as MuiLink } from '@mui/material'; import { zodResolver } from '@hookform/resolvers/zod'; import { useTranslation } from 'react-i18next'; import { Link } from 'react-router-dom'; @@ -80,7 +80,7 @@ export function SignInForm({ > {t('worker.signInForm.submitBtn')} - + {/* {t('worker.signInForm.signUp')} - + */} diff --git a/packages/apps/human-app/frontend/src/modules/worker/email-verification/components/email-verification-form-container.tsx b/packages/apps/human-app/frontend/src/modules/worker/email-verification/components/email-verification-form-container.tsx index 80a2ccbd75..24dcda7b19 100644 --- a/packages/apps/human-app/frontend/src/modules/worker/email-verification/components/email-verification-form-container.tsx +++ b/packages/apps/human-app/frontend/src/modules/worker/email-verification/components/email-verification-form-container.tsx @@ -114,7 +114,7 @@ export function EmailVerificationFormContainer() { }} > {!!user && ( diff --git a/packages/apps/human-app/frontend/src/router/router-paths.ts b/packages/apps/human-app/frontend/src/router/router-paths.ts index 0183b5dbd3..753570a90d 100644 --- a/packages/apps/human-app/frontend/src/router/router-paths.ts +++ b/packages/apps/human-app/frontend/src/router/router-paths.ts @@ -1,7 +1,7 @@ export const routerPaths = { homePage: '/', signIn: '/sign-in', - signUp: '/sign-up', + // signUp: '/sign-up', resetPassword: '/reset-password', resetPasswordSuccess: '/reset-password-success', sendResetLink: '/send-reset-link', diff --git a/packages/apps/human-app/frontend/src/router/routes.tsx b/packages/apps/human-app/frontend/src/router/routes.tsx index fd7bb01d82..6997aed3e1 100644 --- a/packages/apps/human-app/frontend/src/router/routes.tsx +++ b/packages/apps/human-app/frontend/src/router/routes.tsx @@ -16,7 +16,7 @@ import { SignInPage, VerifyUserPage } from '@/modules/signin/worker'; import { JobsDiscoveryPage } from '@/modules/worker/jobs-discovery'; import { MyJobsPage } from '@/modules/worker/jobs/my-jobs/my-jobs.page'; import { ProfilePage } from '@/modules/worker/profile'; -import { SignUpPage } from '@/modules/signup/worker'; +// import { SignUpPage } from '@/modules/signup/worker'; import { HomePage } from '@/modules/homepage'; import { ResetPasswordPage, @@ -36,10 +36,10 @@ export const unprotectedRoutes: RouteProps[] = [ path: routerPaths.signIn, element: , }, - { - path: routerPaths.signUp, - element: , - }, + // { + // path: routerPaths.signUp, + // element: , + // }, { path: routerPaths.emailVerification, element: , diff --git a/packages/apps/human-app/frontend/src/shared/i18n/en.json b/packages/apps/human-app/frontend/src/shared/i18n/en.json index d9f1bd89fe..b817c744f5 100644 --- a/packages/apps/human-app/frontend/src/shared/i18n/en.json +++ b/packages/apps/human-app/frontend/src/shared/i18n/en.json @@ -81,6 +81,7 @@ "humanApp": "HUMAN App", "completeJobs": "Complete jobs, earn HMT.", "signUp": "Sign Up", + "signUpClosed": "Registrations are currently closed. We are not accepting new users at this time.", "signIn": "Sign In" }, "worker": { @@ -121,6 +122,7 @@ "title": "Verify Email", "checkYourInbox": "Check your inbox", "backToSignUp": "Back to Sign Up", + "backToSignIn": "Back to Sign In", "btn": "Resend Email", "paragraph1": "We sent a verification link to <1>{{email}}", "paragraph2": "Click the link in the email to verify your account. The link expires in 24 hours.", From 143667e71a6e89754b2295eb794c20ba8074df18 Mon Sep 17 00:00:00 2001 From: KirillKirill Date: Mon, 17 Aug 2026 13:51:57 +0300 Subject: [PATCH 5/7] chore: remove unused files and exports; clean up some types --- .../src/api/authorized-http-api-client.ts | 2 +- .../worker/views/sign-up-worker.page.tsx | 4 +-- .../src/modules/smart-contracts/chains.ts | 36 +++---------------- .../components/mobile/my-jobs-card-mobile.tsx | 5 +-- .../worker/profile/components/index.ts | 2 -- .../profile/components/profile-data.tsx | 3 +- .../data-entry/input-masks/human-currency.tsx | 8 +---- .../data-entry/input-masks/index.ts | 2 -- .../data-entry/input-masks/percents.tsx | 8 +---- .../shared/components/data-entry/input.tsx | 3 +- .../components/hcaptcha/h-captcha-form.tsx | 2 +- .../shared/components/hcaptcha/h-captcha.tsx | 4 +-- .../shared/contexts/generic-auth-context.tsx | 5 +-- .../shared/contexts/jwt-expiration-check.tsx | 10 ++---- .../src/shared/contexts/modal-context.tsx | 13 ++++--- .../wallet-connect/wallet-connect.tsx | 12 +++---- .../frontend/src/shared/errors/handlers.ts | 9 ----- .../frontend/src/shared/errors/index.ts | 1 - .../src/shared/services/signature.service.ts | 2 +- .../src/shared/services/ui-config.service.ts | 2 +- 20 files changed, 39 insertions(+), 94 deletions(-) delete mode 100644 packages/apps/human-app/frontend/src/modules/worker/profile/components/index.ts delete mode 100644 packages/apps/human-app/frontend/src/shared/errors/handlers.ts diff --git a/packages/apps/human-app/frontend/src/api/authorized-http-api-client.ts b/packages/apps/human-app/frontend/src/api/authorized-http-api-client.ts index 92a427d161..4907c45090 100644 --- a/packages/apps/human-app/frontend/src/api/authorized-http-api-client.ts +++ b/packages/apps/human-app/frontend/src/api/authorized-http-api-client.ts @@ -6,7 +6,7 @@ import { } from './http-api-client'; import { AuthService, type AuthProvider } from './auth-service'; -export class AuthorizedHttpApiClient extends HttpApiClient { +class AuthorizedHttpApiClient extends HttpApiClient { constructor( baseUrl: string, private readonly authProvider: AuthProvider diff --git a/packages/apps/human-app/frontend/src/modules/signup/worker/views/sign-up-worker.page.tsx b/packages/apps/human-app/frontend/src/modules/signup/worker/views/sign-up-worker.page.tsx index c36f7e1482..7a9b66bf4e 100644 --- a/packages/apps/human-app/frontend/src/modules/signup/worker/views/sign-up-worker.page.tsx +++ b/packages/apps/human-app/frontend/src/modules/signup/worker/views/sign-up-worker.page.tsx @@ -1,4 +1,4 @@ -import { useEffect } from 'react'; +import { useEffect, type SubmitEvent } from 'react'; import { FormProvider, useForm } from 'react-hook-form'; import { Link as RouterLink, useNavigate } from 'react-router-dom'; import { zodResolver } from '@hookform/resolvers/zod'; @@ -65,7 +65,7 @@ export function SignUpPage() { navigate(-1); }; - const handleSubmit = (event: React.FormEvent) => { + const handleSubmit = (event: SubmitEvent) => { void methods.handleSubmit(signUp)(event); }; diff --git a/packages/apps/human-app/frontend/src/modules/smart-contracts/chains.ts b/packages/apps/human-app/frontend/src/modules/smart-contracts/chains.ts index 7666fcd23d..8f79e50d7e 100644 --- a/packages/apps/human-app/frontend/src/modules/smart-contracts/chains.ts +++ b/packages/apps/human-app/frontend/src/modules/smart-contracts/chains.ts @@ -5,14 +5,13 @@ // function import { ChainId } from '@human-protocol/sdk/src/enums'; import { NETWORKS } from '@human-protocol/sdk/src/constants'; -import { env } from '@/shared/env'; import { MainnetContracts, TestnetContracts, type ContractsAddresses, } from '@/modules/smart-contracts/contracts'; -export interface Chain { +interface Chain { explorerUrl: string; name: string; chainId: number; @@ -23,22 +22,22 @@ export type ChainWithAddresses = Chain & { addresses: ContractsAddresses; }; -export const TestnetChainsIds = [ +const TestnetChainsIds = [ ChainId.POLYGON_AMOY, ChainId.SEPOLIA, ChainId.BSC_TESTNET, ChainId.LOCALHOST, ] as const; -export const MainnetChainsIds = [ +const MainnetChainsIds = [ ChainId.POLYGON, ChainId.MAINNET, ChainId.BSC_MAINNET, ChainId.ALL, ] as const; -export type TestnetNarrow = Exclude; -export type MainnetNarrow = Exclude; +type TestnetNarrow = Exclude; +type MainnetNarrow = Exclude; export const TestnetChains: readonly ChainWithAddresses[] = [ { @@ -87,28 +86,3 @@ function getChainConfigsForChainIds( } return result; } - -const handleFilterChains = ( - chainsArr: ChainWithAddresses[], - chainIdsEnabled: number[] -) => { - return chainsArr.filter((chain) => - chainIdsEnabled.some((el) => el === chain.chainId) - ); -}; - -export const getTestnetChainsEnabled = (chainIdsEnabled: number[]) => { - return handleFilterChains(AllTestnetsChains, chainIdsEnabled); -}; - -export const getMainnetChainsEnabled = (chainIdsEnabled: number[]) => { - return handleFilterChains(AllMainnetChains, chainIdsEnabled); -}; - -export const getEnabledChainsByUiConfig = ( - chainIdsEnabled: number[] -): Chain[] => - (env.VITE_NETWORK === 'mainnet' - ? getMainnetChainsEnabled(chainIdsEnabled) - : getTestnetChainsEnabled(chainIdsEnabled) - ).map(({ addresses: _, ...chainData }) => chainData); diff --git a/packages/apps/human-app/frontend/src/modules/worker/jobs/my-jobs/components/mobile/my-jobs-card-mobile.tsx b/packages/apps/human-app/frontend/src/modules/worker/jobs/my-jobs/components/mobile/my-jobs-card-mobile.tsx index 62e5356d7b..1d835fe187 100644 --- a/packages/apps/human-app/frontend/src/modules/worker/jobs/my-jobs/components/mobile/my-jobs-card-mobile.tsx +++ b/packages/apps/human-app/frontend/src/modules/worker/jobs/my-jobs/components/mobile/my-jobs-card-mobile.tsx @@ -1,3 +1,4 @@ +import { type ReactNode } from 'react'; import { Chip, Paper, Stack, Typography } from '@mui/material'; import { useTranslation } from 'react-i18next'; @@ -23,8 +24,8 @@ const Row = ({ children, }: { label: string; - icon: React.ReactNode; - children: React.ReactNode; + icon: ReactNode; + children: ReactNode; }) => { return ( void; name: string; } -export type InputMaskComponent = ForwardRefExoticComponent< - CustomProps & RefAttributes ->; - export const HumanCurrencyInputMask = forwardRef< NumericFormatProps, CustomProps diff --git a/packages/apps/human-app/frontend/src/shared/components/data-entry/input-masks/index.ts b/packages/apps/human-app/frontend/src/shared/components/data-entry/input-masks/index.ts index 675216357f..58cc5d4298 100644 --- a/packages/apps/human-app/frontend/src/shared/components/data-entry/input-masks/index.ts +++ b/packages/apps/human-app/frontend/src/shared/components/data-entry/input-masks/index.ts @@ -4,5 +4,3 @@ import { PercentsInputMask } from '@/shared/components/data-entry/input-masks/pe export type InputMask = | typeof HumanCurrencyInputMask | typeof PercentsInputMask; - -export { HumanCurrencyInputMask, PercentsInputMask }; diff --git a/packages/apps/human-app/frontend/src/shared/components/data-entry/input-masks/percents.tsx b/packages/apps/human-app/frontend/src/shared/components/data-entry/input-masks/percents.tsx index 2985abf67d..6fe8cc1cc0 100644 --- a/packages/apps/human-app/frontend/src/shared/components/data-entry/input-masks/percents.tsx +++ b/packages/apps/human-app/frontend/src/shared/components/data-entry/input-masks/percents.tsx @@ -1,18 +1,12 @@ import { t } from 'i18next'; -import type { ForwardRefExoticComponent, RefAttributes } from 'react'; import { forwardRef } from 'react'; -import type { NumericFormatProps } from 'react-number-format'; -import { NumericFormat } from 'react-number-format'; +import { NumericFormat, type NumericFormatProps } from 'react-number-format'; interface CustomProps { onChange: (event: { target: { name: string; value: string } }) => void; name: string; } -export type InputMaskComponent = ForwardRefExoticComponent< - CustomProps & RefAttributes ->; - export const PercentsInputMask = forwardRef( function NumericFormatCustom(props, ref) { const { onChange, ...other } = props; diff --git a/packages/apps/human-app/frontend/src/shared/components/data-entry/input.tsx b/packages/apps/human-app/frontend/src/shared/components/data-entry/input.tsx index 49ff1cf5d1..a232c51896 100644 --- a/packages/apps/human-app/frontend/src/shared/components/data-entry/input.tsx +++ b/packages/apps/human-app/frontend/src/shared/components/data-entry/input.tsx @@ -1,3 +1,4 @@ +import { type ReactNode } from 'react'; import { Controller } from 'react-hook-form'; import { type TextFieldProps, TextField, Typography } from '@mui/material'; @@ -8,7 +9,7 @@ export interface InputProps extends OmittedProps { name: string; label?: string; autoComplete?: string; - customError?: React.ReactNode; + customError?: ReactNode; mask?: InputMask; } diff --git a/packages/apps/human-app/frontend/src/shared/components/hcaptcha/h-captcha-form.tsx b/packages/apps/human-app/frontend/src/shared/components/hcaptcha/h-captcha-form.tsx index e1821ee9f1..acc69b60d5 100644 --- a/packages/apps/human-app/frontend/src/shared/components/hcaptcha/h-captcha-form.tsx +++ b/packages/apps/human-app/frontend/src/shared/components/hcaptcha/h-captcha-form.tsx @@ -10,7 +10,7 @@ interface HCaptchaFormProps { error?: unknown; } -export function HCaptchaForm({ name, error }: Readonly) { +export function HCaptchaForm({ name, error }: HCaptchaFormProps) { const { setValue, formState } = useFormContext>(); const customCaptchaRef = useRef(null); diff --git a/packages/apps/human-app/frontend/src/shared/components/hcaptcha/h-captcha.tsx b/packages/apps/human-app/frontend/src/shared/components/hcaptcha/h-captcha.tsx index f548c4c862..8189fb030e 100644 --- a/packages/apps/human-app/frontend/src/shared/components/hcaptcha/h-captcha.tsx +++ b/packages/apps/human-app/frontend/src/shared/components/hcaptcha/h-captcha.tsx @@ -1,4 +1,4 @@ -import { forwardRef, useImperativeHandle, useRef } from 'react'; +import { forwardRef, useImperativeHandle, useRef, type Ref } from 'react'; import HCaptcha from '@hcaptcha/react-hcaptcha'; import { env } from '@/shared/env'; @@ -12,7 +12,7 @@ interface CustomHCaptchaProps { function InternalHCaptcha( { onVerify }: CustomHCaptchaProps, - ref: React.Ref + ref: Ref ) { const captchaRef = useRef(null); diff --git a/packages/apps/human-app/frontend/src/shared/contexts/generic-auth-context.tsx b/packages/apps/human-app/frontend/src/shared/contexts/generic-auth-context.tsx index 15b5158301..e2f5955298 100644 --- a/packages/apps/human-app/frontend/src/shared/contexts/generic-auth-context.tsx +++ b/packages/apps/human-app/frontend/src/shared/contexts/generic-auth-context.tsx @@ -1,7 +1,8 @@ -import React, { createContext, useState, useEffect } from 'react'; +import { createContext, useState, useEffect, type ReactNode } from 'react'; import { jwtDecode } from 'jwt-decode'; import { type ZodType } from 'zod'; import { useQueryClient } from '@tanstack/react-query'; + import { browserAuthProvider } from '@/shared/contexts/browser-auth-provider'; import { type AuthTokensSuccessResponse } from '@/shared/schemas'; import { type UserData } from '@/modules/auth/context/auth-context'; @@ -37,7 +38,7 @@ export function createAuthProvider(config: { AuthenticatedUserContextType | UnauthenticatedUserContextType | null >(null); - function AuthProvider({ children }: Readonly<{ children: React.ReactNode }>) { + function AuthProvider({ children }: { children: ReactNode }) { const queryClient = useQueryClient(); const [authState, setAuthState] = useState<{ user: T | null; diff --git a/packages/apps/human-app/frontend/src/shared/contexts/jwt-expiration-check.tsx b/packages/apps/human-app/frontend/src/shared/contexts/jwt-expiration-check.tsx index 7c4f920abc..e079390ba0 100644 --- a/packages/apps/human-app/frontend/src/shared/contexts/jwt-expiration-check.tsx +++ b/packages/apps/human-app/frontend/src/shared/contexts/jwt-expiration-check.tsx @@ -1,14 +1,10 @@ -import type React from 'react'; -import { useEffect, useRef } from 'react'; +import { useEffect, useRef, type ReactNode } from 'react'; import { useLocation } from 'react-router-dom'; + import { useAccessTokenRefresh } from '@/api/hooks/use-access-token-refresh'; import { useAuth } from '@/modules/auth/hooks/use-auth'; -export function JWTExpirationCheck({ - children, -}: { - children: React.ReactElement; -}) { +export function JWTExpirationCheck({ children }: { children: ReactNode }) { const checksOnProfile = useRef(0); const auth = useAuth(); const location = useLocation(); diff --git a/packages/apps/human-app/frontend/src/shared/contexts/modal-context.tsx b/packages/apps/human-app/frontend/src/shared/contexts/modal-context.tsx index daf1e32eab..e415c802a3 100644 --- a/packages/apps/human-app/frontend/src/shared/contexts/modal-context.tsx +++ b/packages/apps/human-app/frontend/src/shared/contexts/modal-context.tsx @@ -1,4 +1,5 @@ -import React, { +import { + type ReactNode, createContext, useCallback, useContext, @@ -8,7 +9,7 @@ import React, { interface ModalContextType { open: boolean; - content: React.ReactNode; + content: ReactNode; showCloseButton: boolean; disableClose: boolean; openModal: ({ content, showCloseButton }: OpenModalProps) => void; @@ -18,17 +19,15 @@ interface ModalContextType { } interface OpenModalProps { - content: React.ReactNode; + content: ReactNode; showCloseButton?: boolean; } const ModalContext = createContext(undefined); -export function ModalProvider({ - children, -}: Readonly<{ children: React.ReactNode }>) { +export function ModalProvider({ children }: { children: ReactNode }) { const [open, setOpen] = useState(false); - const [content, setContent] = useState(null); + const [content, setContent] = useState(null); const [showCloseButton, setShowCloseButton] = useState(true); const [disableClose, setDisableClose] = useState(false); diff --git a/packages/apps/human-app/frontend/src/shared/contexts/wallet-connect/wallet-connect.tsx b/packages/apps/human-app/frontend/src/shared/contexts/wallet-connect/wallet-connect.tsx index 2f6c27d5e8..bb684e7fb1 100644 --- a/packages/apps/human-app/frontend/src/shared/contexts/wallet-connect/wallet-connect.tsx +++ b/packages/apps/human-app/frontend/src/shared/contexts/wallet-connect/wallet-connect.tsx @@ -1,9 +1,10 @@ -import React, { +import { createContext, useCallback, useEffect, useMemo, useState, + type ReactNode, } from 'react'; import { useAppKit, @@ -15,6 +16,7 @@ import { import { WagmiProvider } from 'wagmi'; import { WagmiAdapter } from '@reown/appkit-adapter-wagmi'; import { polygonAmoy, polygon } from '@reown/appkit/networks'; + import { env } from '@/shared/env'; import { useWeb3Provider } from '@/shared/hooks/use-web3-provider'; import { JsonRpcError } from '@/modules/smart-contracts/json-rpc-error'; @@ -52,7 +54,7 @@ export const WalletConnectContext = createContext< | null >(null); -function AppKitWrapper({ children }: { children: React.ReactNode }) { +function AppKitWrapper({ children }: { children: ReactNode }) { const [initializing, setInitializing] = useState(true); const web3ProviderMutation = useWeb3Provider(); const { open } = useAppKit(); @@ -125,11 +127,7 @@ function AppKitWrapper({ children }: { children: React.ReactNode }) { ); } -export function WalletConnectProvider({ - children, -}: { - children: React.ReactNode; -}) { +export function WalletConnectProvider({ children }: { children: ReactNode }) { return ( {children} diff --git a/packages/apps/human-app/frontend/src/shared/errors/handlers.ts b/packages/apps/human-app/frontend/src/shared/errors/handlers.ts deleted file mode 100644 index 671633a5c5..0000000000 --- a/packages/apps/human-app/frontend/src/shared/errors/handlers.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { t } from 'i18next'; -import { JsonRpcError } from '@/modules/smart-contracts/json-rpc-error'; - -export function jsonRpcErrorHandler(unknownError: unknown) { - if (unknownError instanceof JsonRpcError) { - return unknownError.message; - } - return t('errors.unknown'); -} diff --git a/packages/apps/human-app/frontend/src/shared/errors/index.ts b/packages/apps/human-app/frontend/src/shared/errors/index.ts index 20193c41fd..1a749c1e42 100644 --- a/packages/apps/human-app/frontend/src/shared/errors/index.ts +++ b/packages/apps/human-app/frontend/src/shared/errors/index.ts @@ -1,2 +1 @@ export * from './get-error-message-for-error'; -export * from './handlers'; diff --git a/packages/apps/human-app/frontend/src/shared/services/signature.service.ts b/packages/apps/human-app/frontend/src/shared/services/signature.service.ts index 27dc848e4e..be6d2f919a 100644 --- a/packages/apps/human-app/frontend/src/shared/services/signature.service.ts +++ b/packages/apps/human-app/frontend/src/shared/services/signature.service.ts @@ -27,7 +27,7 @@ const prepareSignatureSuccessSchema = z.object({ nonce: z.unknown(), }); -export type SignatureData = z.infer; +type SignatureData = z.infer; async function prepareSignature(data: PrepareSignatureBody) { try { diff --git a/packages/apps/human-app/frontend/src/shared/services/ui-config.service.ts b/packages/apps/human-app/frontend/src/shared/services/ui-config.service.ts index 0fadf37eaf..4343540456 100644 --- a/packages/apps/human-app/frontend/src/shared/services/ui-config.service.ts +++ b/packages/apps/human-app/frontend/src/shared/services/ui-config.service.ts @@ -9,7 +9,7 @@ const uiConfigSchema = z.object({ chainIdsEnabled: z.array(z.number()), }); -export type UiConfig = z.infer; +type UiConfig = z.infer; async function getUiConfig() { try { From 684dbb50156ee5dc6a6c03064d9db97ffbac3240 Mon Sep 17 00:00:00 2001 From: KirillKirill Date: Mon, 17 Aug 2026 14:53:42 +0300 Subject: [PATCH 6/7] refactor: structure of signup, signin and verify-user modules --- packages/apps/human-app/frontend/src/api/auth-service.ts | 2 +- .../modules/signin/{worker => components}/sign-in-form.tsx | 2 +- .../human-app/frontend/src/modules/signin/hooks/index.ts | 4 ---- .../modules/signin/{worker => hooks}/use-sign-in-mutation.ts | 2 +- .../src/modules/signin/{worker => hooks}/use-sign-in.tsx | 3 ++- .../frontend/src/modules/signin/{worker => }/schemas.ts | 0 .../src/modules/signin/{worker => }/sign-in.page.tsx | 4 ++-- .../human-app/frontend/src/modules/signin/worker/index.ts | 2 -- .../signup/{worker => }/hooks/use-sign-up-mutation.ts | 0 .../modules/signup/{worker => }/hooks/use-sign-up-worker.tsx | 0 .../frontend/src/modules/signup/{worker => }/schema.ts | 0 .../frontend/src/modules/signup/services/signup.service.ts | 2 +- .../views/sign-up-worker.page.tsx => sign-up.page.tsx} | 4 ++-- .../human-app/frontend/src/modules/signup/worker/index.ts | 1 - .../components}/identity-verification-control.tsx | 2 +- .../components}/register-address-btn.tsx | 0 .../worker => verify-user/components}/verification-flow.tsx | 0 .../components}/wallet-connection-control.tsx | 3 ++- .../hooks/use-register-address-notifications.tsx | 0 .../{signin => verify-user}/hooks/use-register-address.ts | 5 +++-- .../{signin => verify-user}/hooks/use-start-idv-mutation.ts | 5 +++-- .../modules/{signin => verify-user}/hooks/use-start-idv.ts | 0 .../services/verify-user.service.ts} | 0 .../{signin/worker => verify-user}/verify-user.page.tsx | 2 +- packages/apps/human-app/frontend/src/router/routes.tsx | 5 +++-- 25 files changed, 23 insertions(+), 25 deletions(-) rename packages/apps/human-app/frontend/src/modules/signin/{worker => components}/sign-in-form.tsx (98%) delete mode 100644 packages/apps/human-app/frontend/src/modules/signin/hooks/index.ts rename packages/apps/human-app/frontend/src/modules/signin/{worker => hooks}/use-sign-in-mutation.ts (92%) rename packages/apps/human-app/frontend/src/modules/signin/{worker => hooks}/use-sign-in.tsx (94%) rename packages/apps/human-app/frontend/src/modules/signin/{worker => }/schemas.ts (100%) rename packages/apps/human-app/frontend/src/modules/signin/{worker => }/sign-in.page.tsx (97%) delete mode 100644 packages/apps/human-app/frontend/src/modules/signin/worker/index.ts rename packages/apps/human-app/frontend/src/modules/signup/{worker => }/hooks/use-sign-up-mutation.ts (100%) rename packages/apps/human-app/frontend/src/modules/signup/{worker => }/hooks/use-sign-up-worker.tsx (100%) rename packages/apps/human-app/frontend/src/modules/signup/{worker => }/schema.ts (100%) rename packages/apps/human-app/frontend/src/modules/signup/{worker/views/sign-up-worker.page.tsx => sign-up.page.tsx} (98%) delete mode 100644 packages/apps/human-app/frontend/src/modules/signup/worker/index.ts rename packages/apps/human-app/frontend/src/modules/{signin/worker => verify-user/components}/identity-verification-control.tsx (99%) rename packages/apps/human-app/frontend/src/modules/{signin/worker => verify-user/components}/register-address-btn.tsx (100%) rename packages/apps/human-app/frontend/src/modules/{signin/worker => verify-user/components}/verification-flow.tsx (100%) rename packages/apps/human-app/frontend/src/modules/{signin/worker => verify-user/components}/wallet-connection-control.tsx (93%) rename packages/apps/human-app/frontend/src/modules/{signin => verify-user}/hooks/use-register-address-notifications.tsx (100%) rename packages/apps/human-app/frontend/src/modules/{signin => verify-user}/hooks/use-register-address.ts (93%) rename packages/apps/human-app/frontend/src/modules/{signin => verify-user}/hooks/use-start-idv-mutation.ts (66%) rename packages/apps/human-app/frontend/src/modules/{signin => verify-user}/hooks/use-start-idv.ts (100%) rename packages/apps/human-app/frontend/src/modules/{signin/services/profile.service.ts => verify-user/services/verify-user.service.ts} (100%) rename packages/apps/human-app/frontend/src/modules/{signin/worker => verify-user}/verify-user.page.tsx (96%) diff --git a/packages/apps/human-app/frontend/src/api/auth-service.ts b/packages/apps/human-app/frontend/src/api/auth-service.ts index f54a1a49c5..967ca6c662 100644 --- a/packages/apps/human-app/frontend/src/api/auth-service.ts +++ b/packages/apps/human-app/frontend/src/api/auth-service.ts @@ -1,5 +1,5 @@ import { jwtDecode } from 'jwt-decode'; -import { type SignInDto } from '@/modules/signin/worker/schemas'; +import { type SignInDto } from '@/modules/signin/schemas'; import { browserAuthProvider } from '@/shared/contexts/browser-auth-provider'; import { type AuthTokensSuccessResponse, diff --git a/packages/apps/human-app/frontend/src/modules/signin/worker/sign-in-form.tsx b/packages/apps/human-app/frontend/src/modules/signin/components/sign-in-form.tsx similarity index 98% rename from packages/apps/human-app/frontend/src/modules/signin/worker/sign-in-form.tsx rename to packages/apps/human-app/frontend/src/modules/signin/components/sign-in-form.tsx index 1420bdaa36..02537f064d 100644 --- a/packages/apps/human-app/frontend/src/modules/signin/worker/sign-in-form.tsx +++ b/packages/apps/human-app/frontend/src/modules/signin/components/sign-in-form.tsx @@ -11,7 +11,7 @@ import { Password } from '@/shared/components/data-entry/password'; import { useResetMutationErrors } from '@/shared/hooks/use-reset-mutation-errors'; import { HCaptchaForm } from '@/shared/components/hcaptcha'; import { routerPaths } from '@/router/router-paths'; -import { type SignInDto, signInDtoSchema } from './schemas'; +import { type SignInDto, signInDtoSchema } from '../schemas'; interface SignInFormProps { onSubmit: (data: SignInDto) => void; diff --git a/packages/apps/human-app/frontend/src/modules/signin/hooks/index.ts b/packages/apps/human-app/frontend/src/modules/signin/hooks/index.ts deleted file mode 100644 index cda829b154..0000000000 --- a/packages/apps/human-app/frontend/src/modules/signin/hooks/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from './use-start-idv'; -export * from './use-start-idv-mutation'; -export * from './use-register-address'; -export * from './use-register-address-notifications'; diff --git a/packages/apps/human-app/frontend/src/modules/signin/worker/use-sign-in-mutation.ts b/packages/apps/human-app/frontend/src/modules/signin/hooks/use-sign-in-mutation.ts similarity index 92% rename from packages/apps/human-app/frontend/src/modules/signin/worker/use-sign-in-mutation.ts rename to packages/apps/human-app/frontend/src/modules/signin/hooks/use-sign-in-mutation.ts index cf75008640..ee2ea03125 100644 --- a/packages/apps/human-app/frontend/src/modules/signin/worker/use-sign-in-mutation.ts +++ b/packages/apps/human-app/frontend/src/modules/signin/hooks/use-sign-in-mutation.ts @@ -2,7 +2,7 @@ import { useMutation } from '@tanstack/react-query'; import { env } from '@/shared/env'; import { AuthService, HttpApiClient } from '@/api'; import { useAuth } from '@/modules/auth/hooks/use-auth'; -import { type SignInDto } from './schemas'; +import { type SignInDto } from '../schemas'; function signInMutationFn(data: SignInDto) { const httpClient = new HttpApiClient(env.VITE_API_URL); diff --git a/packages/apps/human-app/frontend/src/modules/signin/worker/use-sign-in.tsx b/packages/apps/human-app/frontend/src/modules/signin/hooks/use-sign-in.tsx similarity index 94% rename from packages/apps/human-app/frontend/src/modules/signin/worker/use-sign-in.tsx rename to packages/apps/human-app/frontend/src/modules/signin/hooks/use-sign-in.tsx index 477abd65c1..16698fbed9 100644 --- a/packages/apps/human-app/frontend/src/modules/signin/worker/use-sign-in.tsx +++ b/packages/apps/human-app/frontend/src/modules/signin/hooks/use-sign-in.tsx @@ -1,7 +1,8 @@ import { useEffect } from 'react'; + import { browserAuthProvider } from '@/shared/contexts/browser-auth-provider'; import { useSignInMutation } from './use-sign-in-mutation'; -import { type SignInDto } from './schemas'; +import { type SignInDto } from '../schemas'; export function useSignIn() { const { diff --git a/packages/apps/human-app/frontend/src/modules/signin/worker/schemas.ts b/packages/apps/human-app/frontend/src/modules/signin/schemas.ts similarity index 100% rename from packages/apps/human-app/frontend/src/modules/signin/worker/schemas.ts rename to packages/apps/human-app/frontend/src/modules/signin/schemas.ts diff --git a/packages/apps/human-app/frontend/src/modules/signin/worker/sign-in.page.tsx b/packages/apps/human-app/frontend/src/modules/signin/sign-in.page.tsx similarity index 97% rename from packages/apps/human-app/frontend/src/modules/signin/worker/sign-in.page.tsx rename to packages/apps/human-app/frontend/src/modules/signin/sign-in.page.tsx index ca4c557482..f7f5655298 100644 --- a/packages/apps/human-app/frontend/src/modules/signin/worker/sign-in.page.tsx +++ b/packages/apps/human-app/frontend/src/modules/signin/sign-in.page.tsx @@ -5,8 +5,8 @@ import { Box, Grid, Typography } from '@mui/material'; import { getErrorMessageForError } from '@/shared/errors'; import { ApiClientError } from '@/api'; -import { useSignIn } from './use-sign-in'; -import { SignInForm } from './sign-in-form'; +import { useSignIn } from './hooks/use-sign-in'; +import { SignInForm } from './components/sign-in-form'; import signInImage from '@/assets/background-images/signin-background.png'; import { TopNotificationType, diff --git a/packages/apps/human-app/frontend/src/modules/signin/worker/index.ts b/packages/apps/human-app/frontend/src/modules/signin/worker/index.ts deleted file mode 100644 index 33eedcbea5..0000000000 --- a/packages/apps/human-app/frontend/src/modules/signin/worker/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './sign-in.page'; -export * from './verify-user.page'; diff --git a/packages/apps/human-app/frontend/src/modules/signup/worker/hooks/use-sign-up-mutation.ts b/packages/apps/human-app/frontend/src/modules/signup/hooks/use-sign-up-mutation.ts similarity index 100% rename from packages/apps/human-app/frontend/src/modules/signup/worker/hooks/use-sign-up-mutation.ts rename to packages/apps/human-app/frontend/src/modules/signup/hooks/use-sign-up-mutation.ts diff --git a/packages/apps/human-app/frontend/src/modules/signup/worker/hooks/use-sign-up-worker.tsx b/packages/apps/human-app/frontend/src/modules/signup/hooks/use-sign-up-worker.tsx similarity index 100% rename from packages/apps/human-app/frontend/src/modules/signup/worker/hooks/use-sign-up-worker.tsx rename to packages/apps/human-app/frontend/src/modules/signup/hooks/use-sign-up-worker.tsx diff --git a/packages/apps/human-app/frontend/src/modules/signup/worker/schema.ts b/packages/apps/human-app/frontend/src/modules/signup/schema.ts similarity index 100% rename from packages/apps/human-app/frontend/src/modules/signup/worker/schema.ts rename to packages/apps/human-app/frontend/src/modules/signup/schema.ts diff --git a/packages/apps/human-app/frontend/src/modules/signup/services/signup.service.ts b/packages/apps/human-app/frontend/src/modules/signup/services/signup.service.ts index f410015543..8910e4afb4 100644 --- a/packages/apps/human-app/frontend/src/modules/signup/services/signup.service.ts +++ b/packages/apps/human-app/frontend/src/modules/signup/services/signup.service.ts @@ -1,5 +1,5 @@ import { ApiClientError, humanAppApiClient } from '@/api'; -import { type SignUpDto } from '../worker/schema'; +import { type SignUpDto } from '../schema'; const signUpPath = '/auth/signup'; diff --git a/packages/apps/human-app/frontend/src/modules/signup/worker/views/sign-up-worker.page.tsx b/packages/apps/human-app/frontend/src/modules/signup/sign-up.page.tsx similarity index 98% rename from packages/apps/human-app/frontend/src/modules/signup/worker/views/sign-up-worker.page.tsx rename to packages/apps/human-app/frontend/src/modules/signup/sign-up.page.tsx index 7a9b66bf4e..df385f39c8 100644 --- a/packages/apps/human-app/frontend/src/modules/signup/worker/views/sign-up-worker.page.tsx +++ b/packages/apps/human-app/frontend/src/modules/signup/sign-up.page.tsx @@ -13,9 +13,9 @@ import { env } from '@/shared/env'; import { getErrorMessageForError } from '@/shared/errors'; import { HCaptchaForm } from '@/shared/components/hcaptcha'; import { useResetMutationErrors } from '@/shared/hooks/use-reset-mutation-errors'; -import { useSignUpWorker } from '@/modules/signup/worker/hooks/use-sign-up-worker'; +import { useSignUpWorker } from './hooks/use-sign-up-worker'; import { ApiClientError } from '@/api'; -import { signUpDtoSchema } from '../schema'; +import { signUpDtoSchema } from './schema'; import signUpImage from '@/assets/background-images/signup-background.png'; import { BackButton } from '@/shared/components/ui/page-card/back-button'; import { routerPaths } from '@/router/router-paths'; diff --git a/packages/apps/human-app/frontend/src/modules/signup/worker/index.ts b/packages/apps/human-app/frontend/src/modules/signup/worker/index.ts deleted file mode 100644 index 3c0e3dddf5..0000000000 --- a/packages/apps/human-app/frontend/src/modules/signup/worker/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './views/sign-up-worker.page'; diff --git a/packages/apps/human-app/frontend/src/modules/signin/worker/identity-verification-control.tsx b/packages/apps/human-app/frontend/src/modules/verify-user/components/identity-verification-control.tsx similarity index 99% rename from packages/apps/human-app/frontend/src/modules/signin/worker/identity-verification-control.tsx rename to packages/apps/human-app/frontend/src/modules/verify-user/components/identity-verification-control.tsx index 6647abf5be..e6661ecb9c 100644 --- a/packages/apps/human-app/frontend/src/modules/signin/worker/identity-verification-control.tsx +++ b/packages/apps/human-app/frontend/src/modules/verify-user/components/identity-verification-control.tsx @@ -3,7 +3,7 @@ import { useTranslation, Trans } from 'react-i18next'; import { Box, keyframes, Link, Stack, Typography } from '@mui/material'; import { jwtDecode } from 'jwt-decode'; -import { useStartIdv } from '../hooks'; +import { useStartIdv } from '../hooks/use-start-idv'; import { KycStatus } from '@/shared/types/entity.type'; import { env } from '@/shared/env'; import { HourglassIcon, VeriffIcon } from '@/shared/components/ui/icons'; diff --git a/packages/apps/human-app/frontend/src/modules/signin/worker/register-address-btn.tsx b/packages/apps/human-app/frontend/src/modules/verify-user/components/register-address-btn.tsx similarity index 100% rename from packages/apps/human-app/frontend/src/modules/signin/worker/register-address-btn.tsx rename to packages/apps/human-app/frontend/src/modules/verify-user/components/register-address-btn.tsx diff --git a/packages/apps/human-app/frontend/src/modules/signin/worker/verification-flow.tsx b/packages/apps/human-app/frontend/src/modules/verify-user/components/verification-flow.tsx similarity index 100% rename from packages/apps/human-app/frontend/src/modules/signin/worker/verification-flow.tsx rename to packages/apps/human-app/frontend/src/modules/verify-user/components/verification-flow.tsx diff --git a/packages/apps/human-app/frontend/src/modules/signin/worker/wallet-connection-control.tsx b/packages/apps/human-app/frontend/src/modules/verify-user/components/wallet-connection-control.tsx similarity index 93% rename from packages/apps/human-app/frontend/src/modules/signin/worker/wallet-connection-control.tsx rename to packages/apps/human-app/frontend/src/modules/verify-user/components/wallet-connection-control.tsx index af2b13f2ad..9d91d371ee 100644 --- a/packages/apps/human-app/frontend/src/modules/signin/worker/wallet-connection-control.tsx +++ b/packages/apps/human-app/frontend/src/modules/verify-user/components/wallet-connection-control.tsx @@ -1,8 +1,9 @@ import { useTranslation } from 'react-i18next'; import { Stack, Typography } from '@mui/material'; + +import { RegisterAddressBtn } from './register-address-btn'; import { Button } from '@/shared/components/ui/button'; import { useWalletConnect } from '@/shared/contexts/wallet-connect'; -import { RegisterAddressBtn } from '../worker/register-address-btn'; import { useAuth } from '@/modules/auth/hooks/use-auth'; export function WalletConnectionControl() { diff --git a/packages/apps/human-app/frontend/src/modules/signin/hooks/use-register-address-notifications.tsx b/packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-register-address-notifications.tsx similarity index 100% rename from packages/apps/human-app/frontend/src/modules/signin/hooks/use-register-address-notifications.tsx rename to packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-register-address-notifications.tsx diff --git a/packages/apps/human-app/frontend/src/modules/signin/hooks/use-register-address.ts b/packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-register-address.ts similarity index 93% rename from packages/apps/human-app/frontend/src/modules/signin/hooks/use-register-address.ts rename to packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-register-address.ts index 0dca7cb04e..569d4295b6 100644 --- a/packages/apps/human-app/frontend/src/modules/signin/hooks/use-register-address.ts +++ b/packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-register-address.ts @@ -1,11 +1,12 @@ import { useMutation } from '@tanstack/react-query'; import { t } from 'i18next'; + import { useAccessTokenRefresh } from '@/api/hooks/use-access-token-refresh'; import type { ResponseError } from '@/shared/types/global.type'; import { useWalletConnect } from '@/shared/contexts/wallet-connect'; import { usePrepareSignature } from '@/shared/hooks'; import { PrepareSignatureType } from '@/shared/services/signature.service'; -import * as profileService from '../services/profile.service'; +import * as verifyUserService from '../services/verify-user.service'; import { useAuth } from '@/modules/auth/hooks/use-auth'; interface RegisterAddressCallbacks { @@ -36,7 +37,7 @@ function useRegisterAddressMutation(callbacks: RegisterAddressCallbacks) { // wallet address is part of the JWT payload // so we need to refresh the token after the address is registered - await profileService.registerAddress({ address, chainId, signature }); + await verifyUserService.registerAddress({ address, chainId, signature }); await refreshAccessTokenAsync({}); updateUserData({ wallet_address: address, diff --git a/packages/apps/human-app/frontend/src/modules/signin/hooks/use-start-idv-mutation.ts b/packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-start-idv-mutation.ts similarity index 66% rename from packages/apps/human-app/frontend/src/modules/signin/hooks/use-start-idv-mutation.ts rename to packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-start-idv-mutation.ts index c64cb15770..433d2596b0 100644 --- a/packages/apps/human-app/frontend/src/modules/signin/hooks/use-start-idv-mutation.ts +++ b/packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-start-idv-mutation.ts @@ -1,12 +1,13 @@ import { useMutation } from '@tanstack/react-query'; -import * as profileService from '../services/profile.service'; + +import * as verifyUserService from '../services/verify-user.service'; import { useAuth } from '@/modules/auth/hooks/use-auth'; export function useIdvStartMutation() { const { user } = useAuth(); return useMutation({ - mutationFn: async () => profileService.startIdv(), + mutationFn: async () => verifyUserService.startIdv(), mutationKey: ['idvStart', user?.email], }); } diff --git a/packages/apps/human-app/frontend/src/modules/signin/hooks/use-start-idv.ts b/packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-start-idv.ts similarity index 100% rename from packages/apps/human-app/frontend/src/modules/signin/hooks/use-start-idv.ts rename to packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-start-idv.ts diff --git a/packages/apps/human-app/frontend/src/modules/signin/services/profile.service.ts b/packages/apps/human-app/frontend/src/modules/verify-user/services/verify-user.service.ts similarity index 100% rename from packages/apps/human-app/frontend/src/modules/signin/services/profile.service.ts rename to packages/apps/human-app/frontend/src/modules/verify-user/services/verify-user.service.ts diff --git a/packages/apps/human-app/frontend/src/modules/signin/worker/verify-user.page.tsx b/packages/apps/human-app/frontend/src/modules/verify-user/verify-user.page.tsx similarity index 96% rename from packages/apps/human-app/frontend/src/modules/signin/worker/verify-user.page.tsx rename to packages/apps/human-app/frontend/src/modules/verify-user/verify-user.page.tsx index 6fee0f4938..debb6a8b5c 100644 --- a/packages/apps/human-app/frontend/src/modules/signin/worker/verify-user.page.tsx +++ b/packages/apps/human-app/frontend/src/modules/verify-user/verify-user.page.tsx @@ -2,7 +2,7 @@ import { useEffect } from 'react'; import { Navigate, useNavigate } from 'react-router-dom'; import { Stack } from '@mui/material'; -import { VerificationFlow } from './verification-flow'; +import { VerificationFlow } from './components/verification-flow'; import { useAuth } from '@/modules/auth/hooks/use-auth'; import { routerPaths } from '@/router/router-paths'; import { KycStatus } from '@/shared/types/entity.type'; diff --git a/packages/apps/human-app/frontend/src/router/routes.tsx b/packages/apps/human-app/frontend/src/router/routes.tsx index 6997aed3e1..4c41816c45 100644 --- a/packages/apps/human-app/frontend/src/router/routes.tsx +++ b/packages/apps/human-app/frontend/src/router/routes.tsx @@ -12,11 +12,12 @@ import { EmailVerificationProcessPage, VerifyEmailPage, } from '@/modules/worker/email-verification'; -import { SignInPage, VerifyUserPage } from '@/modules/signin/worker'; +import { SignInPage } from '@/modules/signin/sign-in.page'; +import { VerifyUserPage } from '@/modules/verify-user/verify-user.page'; import { JobsDiscoveryPage } from '@/modules/worker/jobs-discovery'; import { MyJobsPage } from '@/modules/worker/jobs/my-jobs/my-jobs.page'; import { ProfilePage } from '@/modules/worker/profile'; -// import { SignUpPage } from '@/modules/signup/worker'; +//import { SignUpPage } from '@/modules/signup/sign-up.page'; import { HomePage } from '@/modules/homepage'; import { ResetPasswordPage, From b95c79d5754c734e425253ac82a5b9af9794b5b4 Mon Sep 17 00:00:00 2001 From: KirillKirill Date: Mon, 17 Aug 2026 16:19:52 +0300 Subject: [PATCH 7/7] refactor: some namespaces of i18n --- .../signin/components/sign-in-form.tsx | 18 +-- .../src/modules/signin/sign-in.page.tsx | 4 +- .../src/modules/signup/sign-up.page.tsx | 23 ++- .../identity-verification-control.tsx | 16 +- .../components/register-address-btn.tsx | 2 +- .../components/verification-flow.tsx | 10 +- .../components/wallet-connection-control.tsx | 4 +- .../use-register-address-notifications.tsx | 2 +- .../frontend/src/shared/i18n/en.json | 138 ++++++++---------- 9 files changed, 94 insertions(+), 123 deletions(-) diff --git a/packages/apps/human-app/frontend/src/modules/signin/components/sign-in-form.tsx b/packages/apps/human-app/frontend/src/modules/signin/components/sign-in-form.tsx index 02537f064d..3f6621465f 100644 --- a/packages/apps/human-app/frontend/src/modules/signin/components/sign-in-form.tsx +++ b/packages/apps/human-app/frontend/src/modules/signin/components/sign-in-form.tsx @@ -47,14 +47,10 @@ export function SignInForm({
- + @@ -67,7 +63,7 @@ export function SignInForm({ textDecoration: 'underline', }} > - {t('worker.signInForm.forgotPassword')} + {t('signInForm.forgotPassword')} @@ -78,7 +74,7 @@ export function SignInForm({ fullWidth loading={isLoading} > - {t('worker.signInForm.submitBtn')} + {t('signInForm.submitBtn')} {/* @@ -93,7 +89,7 @@ export function SignInForm({ fontWeight: 700, }} > - {t('worker.signInForm.or')} + {t('signInForm.or')} - {t('worker.signInForm.dontHaveAccount')} + {t('signInForm.dontHaveAccount')} {' '} - {t('worker.signInForm.signUp')} + {t('signInForm.signUp')} */} diff --git a/packages/apps/human-app/frontend/src/modules/signin/sign-in.page.tsx b/packages/apps/human-app/frontend/src/modules/signin/sign-in.page.tsx index f7f5655298..179db6ec7e 100644 --- a/packages/apps/human-app/frontend/src/modules/signin/sign-in.page.tsx +++ b/packages/apps/human-app/frontend/src/modules/signin/sign-in.page.tsx @@ -23,7 +23,7 @@ function formattedSignInErrorMessage( unknownError: unknown ): string | undefined { if (unknownError instanceof ApiClientError && unknownError.status === 401) { - return t('worker.signInForm.errors.invalidCredentials'); + return t('signInForm.errors.invalidCredentials'); } } @@ -134,7 +134,7 @@ export function SignInPage() { variant="h4" sx={{ color: 'text.auxiliary100' }} > - {t('worker.signInForm.title')} + {t('signInForm.title')} - {t('worker.signUpForm.title')} + {t('signUpForm.title')} - + ), }} - i18nKey="worker.signUpForm.termsOfServiceAndPrivacyPolicy" + i18nKey="signUpForm.termsOfServiceAndPrivacyPolicy" /> @@ -161,7 +158,7 @@ export function SignUpPage() { fullWidth loading={isLoading} > - {t('worker.signUpForm.submitBtn')} + {t('signUpForm.submitBtn')} @@ -176,7 +173,7 @@ export function SignUpPage() { fontWeight: 700, }} > - {t('worker.signUpForm.or')} + {t('signUpForm.or')} - {t('worker.signUpForm.alreadyHaveAccount')} + {t('signUpForm.alreadyHaveAccount')} {' '} - {t('worker.signUpForm.signIn')} + {t('signUpForm.signIn')} diff --git a/packages/apps/human-app/frontend/src/modules/verify-user/components/identity-verification-control.tsx b/packages/apps/human-app/frontend/src/modules/verify-user/components/identity-verification-control.tsx index e6661ecb9c..6558d1eafb 100644 --- a/packages/apps/human-app/frontend/src/modules/verify-user/components/identity-verification-control.tsx +++ b/packages/apps/human-app/frontend/src/modules/verify-user/components/identity-verification-control.tsx @@ -113,7 +113,7 @@ export function IdentityVerificationControl({ components={{ 1: , }} - i18nKey="worker.profile.verificationDeclined" + i18nKey="verifyUser.verificationDeclined" /> ); @@ -135,7 +135,7 @@ export function IdentityVerificationControl({ }} > - {t('worker.profile.verificationOpenedInNewTab')} + {t('verifyUser.verificationOpenedInNewTab')} - {t('worker.profile.completeYourVerification')} + {t('verifyUser.completeYourVerification')} - {t('worker.profile.waitingForVerification')} + {t('verifyUser.waitingForVerification')} @@ -175,7 +175,7 @@ export function IdentityVerificationControl({ loading={isRefreshingAccessToken} onClick={handleCheckVerificationStatus} > - {t('worker.profile.checkVerificationStatus')} + {t('verifyUser.checkVerificationStatus')} @@ -188,7 +188,7 @@ export function IdentityVerificationControl({ variant="body4" sx={{ color: 'text.auxiliary200', mb: { xs: 3, md: 5 } }} > - {t('worker.profile.veriffCopy')} + {t('verifyUser.veriffCopy')} - {t('worker.profile.poweredBy')} + {t('verifyUser.poweredBy')} @@ -214,7 +214,7 @@ export function IdentityVerificationControl({ loading={idvStartIsPending} onClick={startIdv} > - {t('worker.profile.completeIdentityVerification')} + {t('verifyUser.completeIdentityVerification')} ); diff --git a/packages/apps/human-app/frontend/src/modules/verify-user/components/register-address-btn.tsx b/packages/apps/human-app/frontend/src/modules/verify-user/components/register-address-btn.tsx index a644e09cec..2479ece814 100644 --- a/packages/apps/human-app/frontend/src/modules/verify-user/components/register-address-btn.tsx +++ b/packages/apps/human-app/frontend/src/modules/verify-user/components/register-address-btn.tsx @@ -19,7 +19,7 @@ export function RegisterAddressBtn() { loading={isPending} onClick={mutate.bind(undefined, undefined)} > - {t('worker.profile.registerAddress')} + {t('verifyUser.registerAddress')} ); } diff --git a/packages/apps/human-app/frontend/src/modules/verify-user/components/verification-flow.tsx b/packages/apps/human-app/frontend/src/modules/verify-user/components/verification-flow.tsx index 2132065914..29fc8b94ce 100644 --- a/packages/apps/human-app/frontend/src/modules/verify-user/components/verification-flow.tsx +++ b/packages/apps/human-app/frontend/src/modules/verify-user/components/verification-flow.tsx @@ -35,9 +35,7 @@ export function VerificationFlow({ const kycStatus = user?.kyc_status as KycStatus; - const label = kycStatus - ? t(`worker.profile.idvStatusValues.${kycStatus}`) - : ''; + const label = kycStatus ? t(`verifyUser.idvStatusValues.${kycStatus}`) : ''; const isKycDeclined = kycStatus === KycStatus.DECLINED; const isKycStarted = kycStatus !== KycStatus.NONE; @@ -51,7 +49,7 @@ export function VerificationFlow({ variant="h4" sx={{ color: 'text.auxiliary100', mb: { xs: 2.5, md: 5 } }} > - {t('worker.profile.beforeWeGetStarted')} + {t('verifyUser.beforeWeGetStarted')} - {t('worker.profile.identityVerification')} + {t('verifyUser.identityVerification')} {isKycStarted && label && ( - {t('worker.profile.connectYourWallet')} + {t('verifyUser.connectYourWallet')} diff --git a/packages/apps/human-app/frontend/src/modules/verify-user/components/wallet-connection-control.tsx b/packages/apps/human-app/frontend/src/modules/verify-user/components/wallet-connection-control.tsx index 9d91d371ee..7affcb96d1 100644 --- a/packages/apps/human-app/frontend/src/modules/verify-user/components/wallet-connection-control.tsx +++ b/packages/apps/human-app/frontend/src/modules/verify-user/components/wallet-connection-control.tsx @@ -18,7 +18,7 @@ export function WalletConnectionControl() { - {t('worker.profile.walletAddressMessage')} + {t('verifyUser.walletAddressMessage')} ); @@ -31,7 +31,7 @@ export function WalletConnectionControl() { fullWidth onClick={() => void openModal()} > - {t('components.wallet.connectBtn.connect')} + {t('verifyUser.connectWallet')} ); } diff --git a/packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-register-address-notifications.tsx b/packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-register-address-notifications.tsx index 506e6e87c0..e1ba19f51a 100644 --- a/packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-register-address-notifications.tsx +++ b/packages/apps/human-app/frontend/src/modules/verify-user/hooks/use-register-address-notifications.tsx @@ -12,7 +12,7 @@ export function useRegisterAddressNotifications() { const onSuccess = () => { showNotification({ type: TopNotificationType.SUCCESS, - message: t('worker.registerAddress.success'), + message: t('verifyUser.registerAddressSuccess'), }); }; const onError = (error: ResponseError) => { diff --git a/packages/apps/human-app/frontend/src/shared/i18n/en.json b/packages/apps/human-app/frontend/src/shared/i18n/en.json index b817c744f5..5325a4c6ae 100644 --- a/packages/apps/human-app/frontend/src/shared/i18n/en.json +++ b/packages/apps/human-app/frontend/src/shared/i18n/en.json @@ -15,27 +15,18 @@ "required": "Required", "min": "Password should have at least eight characters.", "max": "Max {{count}} characters", - "passwordWeak": "Password should be at least 8 characters long and contain at least one uppercase and one lowercase letter, one number and one special character", "passwordMismatch": "Passwords are not the same", "captcha": "Please complete the captcha", "passwordMissing": "Please enter your password.", "invalidEmail": "Please enter a valid email address.", - "invalidOracleAddress": "Invalid oracle address.", - "publicKeyLengthError": "Public key must be exactly 128 characters long", - "publicKeyHexadecimalStringError": "Public key must be a valid hexadecimal string", - "urlValidationError": "Invalid URL", - "feeValidationError": "Fee value must be an integer between 0 and 100", - "notANumber": "Not a number" + "invalidOracleAddress": "Invalid oracle address." }, "errors": { - "errorWithMessage": "Error with message: {{message}}", "errorWithStatusCode": "Error with status code: {{code}}", "unknown": "An error occurred, please try again.", - "unknownNetwork": "Unknown network", "jsonRpcError": "JSON-RPC error", "unsupportedNetwork": "Network selected in wallet is unsupported.", "unsupportedNetworkWithName": "Network '{{networkName}}' is unsupported.", - "invalidEscrowAddress": "Please enter a valid escrow address.", "noAddress": "No wallet address found.", "cannotSignMessage": "Cannot sign message." }, @@ -64,12 +55,6 @@ "humanProtocol": "HUMAN Protocol", "copyrightNote": "© 2021 HPF. HUMAN Protocol® is a registered trademark" }, - "wallet": { - "connectBtn": { - "disconnect": "Disconnect Wallet", - "connect": "Connect Wallet" - } - }, "pageCardError": { "reload": "Reload", "goHome": "Home Page" @@ -84,40 +69,66 @@ "signUpClosed": "Registrations are currently closed. We are not accepting new users at this time.", "signIn": "Sign In" }, - "worker": { - "signUpForm": { - "fields": { - "createPassword": "Create Password", - "password": "Create Password", - "confirmPassword": "Confirm Password", - "email": "your@email.com" - }, - "errors": { - "emailTaken": "Email is already taken. Please sign in." - }, - "title": "Sign Up", - "submitBtn": "Sign Up", - "passwordDetailedValidation": "Password must contain at least:", - "termsOfServiceAndPrivacyPolicy": "By clicking Sign Up, you agree to our <1>Terms of Service and that you have read our <2>Privacy Policy", - "or": "Or", - "alreadyHaveAccount": "Already have an account?", - "signIn": "Sign In" + "signUpForm": { + "fields": { + "createPassword": "Create Password", + "password": "Create Password", + "confirmPassword": "Confirm Password", + "email": "your@email.com" }, - "signInForm": { - "fields": { - "password": "Password", - "email": "your@email.com" - }, - "errors": { - "invalidCredentials": "Incorrect email or password!" - }, - "title": "Sign In", - "submitBtn": "Sign In", - "forgotPassword": "Forgot Password?", - "or": "Or", - "dontHaveAccount": "Don't have an account?", - "signUp": "Sign Up" + "errors": { + "emailTaken": "Email is already taken. Please sign in." + }, + "title": "Sign Up", + "submitBtn": "Sign Up", + "passwordDetailedValidation": "Password must contain at least:", + "termsOfServiceAndPrivacyPolicy": "By clicking Sign Up, you agree to our <1>Terms of Service and that you have read our <2>Privacy Policy", + "or": "Or", + "alreadyHaveAccount": "Already have an account?", + "signIn": "Sign In" + }, + "signInForm": { + "fields": { + "password": "Password", + "email": "your@email.com" + }, + "errors": { + "invalidCredentials": "Incorrect email or password!" }, + "title": "Sign In", + "submitBtn": "Sign In", + "forgotPassword": "Forgot Password?", + "or": "Or", + "dontHaveAccount": "Don't have an account?", + "signUp": "Sign Up" + }, + "verifyUser": { + "beforeWeGetStarted": "Before we get started", + "identityVerification": "Identity verification", + "connectYourWallet": "Connect your wallet", + "veriffCopy": "We use Veriff to verify your identity. You'll need: keep your phone & Government ID handy.", + "poweredBy": "Powered by", + "completeIdentityVerification": "Complete Identity Verification", + "verificationOpenedInNewTab": "Verification opened in a new tab", + "completeYourVerification": "Complete your verification there, then return here to continue", + "waitingForVerification": "Waiting for verification...", + "checkVerificationStatus": "Check Verification Status", + "verificationDeclined": "We were unable to verify your identity with the information provided. Please <1>contact support", + "walletAddressMessage": "This address is the wallet address where you will receive payments for completing tasks.", + "connectWallet": "Connect Wallet", + "registerAddress": "Register Address", + "registerAddressSuccess": "The address has been successfully registered.", + "idvStatusValues": { + "none": "Not Started", + "approved": "Completed", + "resubmission_requested": "Resubmission Required", + "declined": "Failed", + "review": "Under Review", + "expired": "Expired", + "abandoned": "Abandoned" + } + }, + "worker": { "verifyEmail": { "title": "Verify Email", "checkYourInbox": "Check your inbox", @@ -180,36 +191,8 @@ "walletAddress": "Wallet address", "resetPassword": "Reset Password", "logout": "Logout", - "beforeWeGetStarted": "Before we get started", - "identityVerification": "Identity verification", - "veriffCopy": "We use Veriff to verify your identity. You'll need: keep your phone & Government ID handy.", - "poweredBy": "Powered by", - "completeIdentityVerification": "Complete Identity Verification", - "verificationOpenedInNewTab": "Verification opened in a new tab", - "completeYourVerification": "Complete your verification there, then return here to continue", - "waitingForVerification": "Waiting for verification...", - "checkVerificationStatus": "Check Verification Status", - "verificationDeclined": "We were unable to verify your identity with the information provided. Please <1>contact support", - "confirmEmail": "Confirm email", - "walletAddressMessage": "This address is the wallet address where you will receive payments for completing tasks.", - "connectYourWallet": "Connect your wallet", - "connectWallet": "Connect Wallet", - "walletConnected": "Connected", - "addKYCInfoOnChain": "Add KYC Info On-chain", - "wrongWalletAddress": "Selected wallet address doesn't match the address assigned to the account.", - "registerAddress": "Register Address", - "emailNotifications": "Email Notifications", "topNotifications": { "completeSteps": "Please set up your profile by completing the steps below." - }, - "idvStatusValues": { - "none": "Not Started", - "approved": "Completed", - "resubmission_requested": "Resubmission Required", - "declined": "Failed", - "review": "Under Review", - "expired": "Expired", - "abandoned": "Abandoned" } }, "oraclesList": { @@ -314,9 +297,6 @@ "solvedSuccess": "HCaptcha solved!", "loadingLiveStatistics": "Loading live statistics" }, - "registerAddress": { - "success": "The address has been successfully registered." - }, "reportAbuse": { "modalHeader": "Report Abuse", "modalParagraph": "Notice something inappropriate or incorrect? Let us know if this task contains harmful, offensive, or misleading content. Your report will be reviewed confidentially.",