Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
3b91dcd
[HUMAN App] refactor: separated components form welcome page (#3160)
mpblocky Mar 7, 2025
f230bdc
fix: correct indentation in subgraphs CI workflow configuration (#3166)
portuu3 Mar 7, 2025
01dac52
remove mainnet checks from fiat payments (#3167)
portuu3 Mar 10, 2025
1c63e1d
[HUMAN App] chore: remove playground page (#3159)
mpblocky Mar 10, 2025
3c7eacf
[HUMAN App]: refactor: simplify operator profile page (#3158)
mpblocky Mar 10, 2025
b22f74e
[Reputation Oracle] refactor: properly use auth strategies (#3168)
dnechay Mar 10, 2025
b79c906
[Job Launcher] Multitoken (#3164)
flopez7 Mar 10, 2025
5f7b2d9
chore(deps): bump @tanstack/react-query-persist-client (#3170)
dependabot[bot] Mar 10, 2025
3524781
[HUMAN App] chore: remove unused hook (#3178)
mpblocky Mar 11, 2025
e3561d9
[HUMAN App] chore: move start kyc mutation hook to module (#3177)
mpblocky Mar 11, 2025
075adaa
[HUMAN App] chore: move solve hcaptcha hook to module (#3175)
mpblocky Mar 11, 2025
afedd0c
[HUMAN App] refactor: available jobs in worker module (#2996)
adrian-oleskiewicz Mar 11, 2025
bebf66b
[Job Launcher Server] Move withdrawal creation logic to payments modu…
flopez7 Mar 11, 2025
dfb60a6
[Job Launcher] Update payment info (#3176)
flopez7 Mar 11, 2025
950bf8a
chore(deps): bump @tanstack/react-query from 5.66.0 to 5.67.2 (#3172)
dependabot[bot] Mar 12, 2025
54b688c
[HUMAN App] refactor: reset password services (#3180)
mpblocky Mar 12, 2025
2490dff
[HUMAN App] refactor: email verification service (#3179)
mpblocky Mar 12, 2025
5615657
[Reputation Oracle] Refactor `KYC` module (#3173)
Dzeranov Mar 12, 2025
05077cc
[Job Launcher] GCV integration (#3022)
0xVoronov Mar 12, 2025
dd88e4e
[HUMAN App] chore: move registration mutation hook (#3185)
mpblocky Mar 12, 2025
2d3adb6
[HUMAN App] refactor: service sign up (#3184)
mpblocky Mar 13, 2025
2e9471f
remove token addresses in constants (#3192)
flopez7 Mar 13, 2025
7eb1358
[Reputation Oracle] `NDA` module refactoring (#3188)
Dzeranov Mar 14, 2025
173f8f0
[Reputation Oracle] refactor: added rules to the `Joi` env validation…
Dzeranov Mar 17, 2025
7c1b969
[HUMAN App] refactor: my jobs table components (#3186)
mpblocky Mar 17, 2025
49e8c82
WIP: 3a1a3cdd4 refactor: update token decimals handling and improve i…
flopez7 Mar 18, 2025
dffbfd9
chore(deps): bump @tanstack/query-sync-storage-persister (#3199)
dependabot[bot] Mar 18, 2025
098abfc
[Reputation Oracle] refactor: user module (#3174)
dnechay Mar 18, 2025
8b2b0ee
refactor: update token decimals handling and improve input validation…
flopez7 Mar 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/workflows/cd-subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
max-parallel: 3
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
- uses: actions/setup-node@v4
name: Set up Node.js
with:
node-version-file: .nvmrc
- name: Filter Networks
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-test-subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
uses: actions/setup-node@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- run: npm install --global yarn && yarn
Expand Down
2 changes: 1 addition & 1 deletion packages/apps/dashboard/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@mui/styled-engine-sc": "6.4.0",
"@mui/x-data-grid": "^7.23.2",
"@mui/x-date-pickers": "^7.23.6",
"@tanstack/react-query": "^5.48.0",
"@tanstack/react-query": "^5.67.2",
"@types/react-router-dom": "^5.3.3",
"@types/recharts": "^1.8.29",
"axios": "^1.7.2",
Expand Down
6 changes: 3 additions & 3 deletions packages/apps/fortune/exchange-oracle/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
"dependencies": {
"@human-protocol/sdk": "*",
"@mui/material": "^5.16.7",
"@tanstack/query-sync-storage-persister": "^5.59.0",
"@tanstack/react-query": "^5.60.5",
"@tanstack/react-query-persist-client": "^5.66.9",
"@tanstack/query-sync-storage-persister": "^5.68.0",
"@tanstack/react-query": "^5.67.2",
"@tanstack/react-query-persist-client": "^5.67.2",
"axios": "^1.7.2",
"ethers": "^6.13.5",
"react": "^18.3.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/apps/human-app/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@reown/appkit": "1.3.2",
"@reown/appkit-adapter-wagmi": "1.3.2",
"@synaps-io/verify-sdk": "^4.0.45",
"@tanstack/react-query": "^5.61.0",
"@tanstack/react-query": "^5.67.2",
"date-fns": "^4.1.0",
"ethers": "^6.13.5",
"i18next": "^23.8.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { apiPaths } from '@/api/api-paths';
import { browserAuthProvider } from '@/shared/contexts/browser-auth-provider';
import { signInSuccessResponseSchema } from '@/modules/worker/services/sign-in/schema';
import { authTokensSuccessResponseSchema } from '@/shared/schemas';

export const fetchTokenRefresh = async (baseUrl: string) => {
const response = await fetch(
Expand All @@ -23,7 +23,7 @@ export const fetchTokenRefresh = async (baseUrl: string) => {

const data: unknown = await response.json();

const refetchAccessTokenSuccess = signInSuccessResponseSchema.parse(data);
const refetchAccessTokenSuccess = authTokensSuccessResponseSchema.parse(data);

return refetchAccessTokenSuccess;
};
4 changes: 2 additions & 2 deletions packages/apps/human-app/frontend/src/api/fetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { ZodError, type ZodType, type ZodTypeDef } from 'zod';
import type { ResponseError } from '@/shared/types/global.type';
import { browserAuthProvider } from '@/shared/contexts/browser-auth-provider';
import { env } from '@/shared/env';
import { type SignInSuccessResponse } from '@/modules/worker/services/sign-in/types';
import { normalizeBaseUrl } from '@/shared/helpers/url';
import { type AuthTokensSuccessResponse } from '@/shared/schemas';
import { fetchTokenRefresh } from './fetch-refresh-token';

const appendHeader = (
Expand Down Expand Up @@ -66,7 +66,7 @@ export type FetcherOptions<SuccessInput, SuccessOutput> =

export type FetcherUrl = string | URL;

let refreshPromise: Promise<SignInSuccessResponse | null> | null = null;
let refreshPromise: Promise<AuthTokensSuccessResponse | null> | null = null;

export async function refreshToken(): Promise<{
access_token: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import { useState, createContext, useEffect } from 'react';
import { jwtDecode } from 'jwt-decode';
import { z } from 'zod';
import { useQueryClient } from '@tanstack/react-query';
import type { SignInSuccessResponse } from '@/modules/worker/services/sign-in/types';
import { browserAuthProvider } from '@/shared/contexts/browser-auth-provider';
import {
ModalType,
useModalStore,
} from '@/shared/components/ui/modal/modal.store';
import { type AuthTokensSuccessResponse } from '@/shared/schemas';

const web3userDataSchema = z.object({
userId: z.number(),
Expand All @@ -25,15 +25,15 @@ export interface Web3AuthenticatedUserContextType {
user: Web3UserData;
status: AuthStatus;
signOut: (throwExpirationModal?: boolean) => void;
signIn: (singIsSuccess: SignInSuccessResponse) => void;
signIn: (singIsSuccess: AuthTokensSuccessResponse) => void;
updateUserData: (updateUserDataPayload: Partial<Web3UserData>) => void;
}

interface Web3UnauthenticatedUserContextType {
user: null;
status: AuthStatus;
signOut: (throwExpirationModal?: boolean) => void;
signIn: (singIsSuccess: SignInSuccessResponse) => void;
signIn: (singIsSuccess: AuthTokensSuccessResponse) => void;
}

export const Web3AuthContext = createContext<
Expand Down Expand Up @@ -97,7 +97,7 @@ export function Web3AuthProvider({ children }: { children: React.ReactNode }) {
}
};

const signIn = (singIsSuccess: SignInSuccessResponse) => {
const signIn = (singIsSuccess: AuthTokensSuccessResponse) => {
browserAuthProvider.signIn(singIsSuccess, 'web3');
handleSignIn();
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import { useState, createContext, useEffect } from 'react';
import { jwtDecode } from 'jwt-decode';
import { z } from 'zod';
import { useQueryClient } from '@tanstack/react-query';
import type { SignInSuccessResponse } from '@/modules/worker/services/sign-in/types';
import { browserAuthProvider } from '@/shared/contexts/browser-auth-provider';
import {
ModalType,
useModalStore,
} from '@/shared/components/ui/modal/modal.store';
import { type AuthTokensSuccessResponse } from '@/shared/schemas';

const extendableUserDataSchema = z.object({
site_key: z.string().optional().nullable(),
Expand All @@ -35,15 +35,15 @@ export interface AuthenticatedUserContextType {
user: UserData;
status: AuthStatus;
signOut: (throwExpirationModal?: boolean) => void;
signIn: (singIsSuccess: SignInSuccessResponse) => void;
signIn: (singIsSuccess: AuthTokensSuccessResponse) => void;
updateUserData: (updateUserDataPayload: UpdateUserDataPayload) => void;
}

interface UnauthenticatedUserContextType {
user: null;
status: AuthStatus;
signOut: (throwExpirationModal?: boolean) => void;
signIn: (singIsSuccess: SignInSuccessResponse) => void;
signIn: (singIsSuccess: AuthTokensSuccessResponse) => void;
}

export const AuthContext = createContext<
Expand Down Expand Up @@ -112,7 +112,7 @@ export function AuthProvider({ children }: { children: React.ReactNode }) {
}
};

const signIn = (singIsSuccess: SignInSuccessResponse) => {
const signIn = (singIsSuccess: AuthTokensSuccessResponse) => {
browserAuthProvider.signIn(singIsSuccess, 'web2');
handleSignIn();
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
export * from './home-container';
export * from './welcome';
export * from './choose-sign-up-account-type';
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
import { Grid, Stack, Typography } from '@mui/material';
import { useTranslation } from 'react-i18next';
import {
MobileHomeIcons,
HomepageWorkIcon,
HomepageUserIcon,
HomepageLogoIcon,
} from '@/shared/components/ui/icons';
import { useIsMobile } from '@/shared/hooks/use-is-mobile';

export function LogoSection() {
const { t } = useTranslation();
const logoText: string = t('homepage.humanApp');
const logoTextSplit: string[] = logoText.split(' ');
const isMobile = useIsMobile('lg');

return (
<Grid container direction="column" justifyContent="center">
{isMobile ? (
<Stack
alignItems="center"
direction="row"
justifyContent="center"
sx={{ svg: { margin: '-1.4rem' } }}
>
<MobileHomeIcons />
</Stack>
) : (
<Stack
direction="row"
maxHeight="80px"
mb="1.5rem"
sx={{ transform: 'translateX(-4.5%)' }}
>
<Grid sx={{ mx: '24px' }}>
<HomepageWorkIcon />
</Grid>
<Grid sx={{ mx: '24px' }}>
<HomepageUserIcon />
</Grid>
<Grid sx={{ mx: '24px' }}>
<HomepageLogoIcon />
</Grid>
</Stack>
)}
<Stack
direction="row"
justifyContent={isMobile ? 'center' : 'flex-start'}
sx={{ marginTop: '0' }}
>
<Typography variant="h1">{logoTextSplit[0]}</Typography>
<Typography
sx={{ fontWeight: '400', marginLeft: '1.25rem' }}
variant="h1"
>
{logoTextSplit[1]}
</Typography>
</Stack>
<Typography
sx={{
marginTop: '1.875rem',
marginBottom: '3.8125rem',
typography: { md: 'h5' },
}}
textAlign={isMobile ? 'center' : 'left'}
variant="h6"
>
{t('homepage.completeJobs')}
</Typography>
</Grid>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { Link } from 'react-router-dom';
import Snackbar from '@mui/material/Snackbar';
import { Button } from '@/shared/components/ui/button';
import { useWalletConnect } from '@/shared/contexts/wallet-connect';
import { useWeb3SignIn } from '@/modules/operator/hooks/use-web3-signin';
import { useWeb3Auth } from '@/modules/auth-web3/hooks/use-web3-auth';
import { routerPaths } from '@/router/router-paths';
import { getErrorMessageForError } from '@/shared/errors';
import { PrepareSignatureType } from '@/api/hooks/use-prepare-signature';
import { useWeb3SignIn } from '../hooks';

export function OperatorSignIn() {
const { isConnected, openModal, address } = useWalletConnect();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { Paper, Button, Divider } from '@mui/material';
import { useTranslation } from 'react-i18next';
import { useColorMode } from '@/shared/contexts/color-mode';
import { useHomePageState } from '@/shared/contexts/homepage-state';
import { useIsMobile } from '@/shared/hooks/use-is-mobile';
import { OperatorSignIn } from './operator-sign-in';
import { WorkerSignIn } from './worker-sign-in';

export function SignInSection() {
const isMobile = useIsMobile('lg');
const { colorPalette } = useColorMode();
const { setPageView } = useHomePageState();
const { t } = useTranslation();

return (
<Paper
sx={{
px: isMobile ? '16px' : '4.1875rem',
py: isMobile ? '32px' : '4.8125rem',
backgroundColor: colorPalette.paper.light,
boxShadow: 'none',
borderRadius: '20px',
}}
>
<Button
color="secondary"
fullWidth
onClick={() => {
setPageView('chooseSignUpAccountType');
}}
size="large"
sx={{ mb: '1.5625rem' }}
variant="contained"
>
{t('homepage.signUp')}
</Button>
<Divider component="div" sx={{ mb: '1.5625rem' }} variant="middle" />
<WorkerSignIn />
<OperatorSignIn />
</Paper>
);
}
Loading