diff --git a/.changeset/new-suits-wink.md b/.changeset/new-suits-wink.md
new file mode 100644
index 0000000000..1e38801504
--- /dev/null
+++ b/.changeset/new-suits-wink.md
@@ -0,0 +1,5 @@
+---
+"@human-protocol/sdk": patch
+---
+
+enhance transaction handling to support bigint for block filters
diff --git a/.changeset/proud-carrots-stop.md b/.changeset/proud-carrots-stop.md
new file mode 100644
index 0000000000..eb56cd31ef
--- /dev/null
+++ b/.changeset/proud-carrots-stop.md
@@ -0,0 +1,6 @@
+---
+"@human-protocol/sdk": patch
+"@human-protocol/python-sdk": patch
+---
+
+remove SUBGRAPH_API_KEY placeholder and simplify subgraph URL handling
diff --git a/.changeset/three-plants-open.md b/.changeset/three-plants-open.md
new file mode 100644
index 0000000000..0eae268aa6
--- /dev/null
+++ b/.changeset/three-plants-open.md
@@ -0,0 +1,6 @@
+---
+"@human-protocol/sdk": minor
+"@human-protocol/python-sdk": minor
+---
+
+enhance transaction handling with timeout and confirmations
diff --git a/.github/workflows/cd-python-sdk.yaml b/.github/workflows/cd-python-sdk.yaml
index dca5e340a5..4fc169bb31 100644
--- a/.github/workflows/cd-python-sdk.yaml
+++ b/.github/workflows/cd-python-sdk.yaml
@@ -30,7 +30,7 @@ jobs:
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- - uses: actions/setup-node@v4
+ - uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
cache: yarn
diff --git a/.github/workflows/ci-test-python-sdk.yaml b/.github/workflows/ci-test-python-sdk.yaml
index f5126f610e..ae61f34a2a 100644
--- a/.github/workflows/ci-test-python-sdk.yaml
+++ b/.github/workflows/ci-test-python-sdk.yaml
@@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- - uses: actions/setup-node@v4
+ - uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
cache: yarn
diff --git a/.nvmrc b/.nvmrc
index f3c67fcf74..98116556ce 100644
--- a/.nvmrc
+++ b/.nvmrc
@@ -1 +1 @@
-22.14
\ No newline at end of file
+24.13
\ No newline at end of file
diff --git a/package.json b/package.json
index f70643a3a2..97bdbc91ad 100644
--- a/package.json
+++ b/package.json
@@ -21,7 +21,7 @@
"devDependencies": {
"@changesets/cli": "^2.29.6",
"husky": "^9.1.6",
- "lint-staged": "^15.4.3"
+ "lint-staged": "^16.2.7"
},
"resolutions": {
"gluegun/ejs": "^3.1.10",
diff --git a/packages/apps/dashboard/client/package.json b/packages/apps/dashboard/client/package.json
index b733e08e02..e34764dbf4 100644
--- a/packages/apps/dashboard/client/package.json
+++ b/packages/apps/dashboard/client/package.json
@@ -43,7 +43,7 @@
"use-debounce": "^10.0.2",
"vite-plugin-node-polyfills": "^0.23.0",
"zod": "^4.0.17",
- "zustand": "^4.5.4"
+ "zustand": "^5.0.10"
},
"devDependencies": {
"@eslint/js": "^9.27.0",
diff --git a/packages/apps/dashboard/server/package.json b/packages/apps/dashboard/server/package.json
index 2dadd9282a..2ca5aa4d17 100644
--- a/packages/apps/dashboard/server/package.json
+++ b/packages/apps/dashboard/server/package.json
@@ -24,26 +24,27 @@
"@human-protocol/core": "workspace:*",
"@human-protocol/logger": "workspace:*",
"@human-protocol/sdk": "workspace:*",
- "@nestjs/axios": "^3.1.2",
- "@nestjs/cache-manager": "^2.2.2",
- "@nestjs/common": "^10.2.7",
- "@nestjs/config": "^3.2.3",
- "@nestjs/core": "^11.1.9",
- "@nestjs/mapped-types": "*",
- "@nestjs/platform-express": "^10.3.10",
+ "@keyv/redis": "^5.1.5",
+ "@nestjs/axios": "^4.0.1",
+ "@nestjs/cache-manager": "^3.1.0",
+ "@nestjs/common": "^11.1.12",
+ "@nestjs/config": "^4.0.2",
+ "@nestjs/core": "^11.1.12",
+ "@nestjs/mapped-types": "^2.1.0",
+ "@nestjs/platform-express": "^11.1.12",
"axios": "^1.3.1",
- "cache-manager": "^5.4.0",
- "cache-manager-redis-yet": "^5.1.5",
+ "cache-manager": "7.2.8",
"dayjs": "^1.11.12",
"ethers": "~6.15.0",
+ "keyv": "^5.5.5",
"lodash": "^4.17.21",
"reflect-metadata": "^0.2.2",
"rxjs": "^7.2.0"
},
"devDependencies": {
- "@nestjs/cli": "^10.3.2",
- "@nestjs/schematics": "^11.0.2",
- "@nestjs/testing": "^10.4.6",
+ "@nestjs/cli": "^11.0.16",
+ "@nestjs/schematics": "^11.0.9",
+ "@nestjs/testing": "^11.1.12",
"@types/express": "^4.17.13",
"@types/jest": "30.0.0",
"@types/node": "22.10.5",
diff --git a/packages/apps/dashboard/server/src/common/config/cache-factory.config.ts b/packages/apps/dashboard/server/src/common/config/cache-factory.config.ts
index 76ed739658..f7c6350826 100644
--- a/packages/apps/dashboard/server/src/common/config/cache-factory.config.ts
+++ b/packages/apps/dashboard/server/src/common/config/cache-factory.config.ts
@@ -1,8 +1,8 @@
import { CacheModuleAsyncOptions } from '@nestjs/common/cache';
import { ConfigModule } from '@nestjs/config';
-import { redisStore } from 'cache-manager-redis-yet';
import * as _ from 'lodash';
+import KeyvRedis, { Keyv } from '@keyv/redis';
import logger from '../../logger';
import { RedisConfigService } from './redis-config.service';
@@ -17,7 +17,7 @@ export const CacheFactoryConfig: CacheModuleAsyncOptions = {
isGlobal: true,
imports: [ConfigModule],
useFactory: async (configService: RedisConfigService) => {
- const store = await redisStore({
+ const redisAdapter = new KeyvRedis({
socket: {
host: configService.redisHost,
port: configService.redisPort,
@@ -26,10 +26,17 @@ export const CacheFactoryConfig: CacheModuleAsyncOptions = {
disableOfflineQueue: true,
});
- store.client.on('error', throttledRedisErrorLog);
+ redisAdapter.on('error', throttledRedisErrorLog);
+ redisAdapter.client.on?.('error', throttledRedisErrorLog);
+
+ const keyvStore = new Keyv({
+ store: redisAdapter,
+ namespace: undefined,
+ useKeyPrefix: false,
+ });
return {
- store: () => store,
+ stores: [keyvStore],
};
},
inject: [RedisConfigService],
diff --git a/packages/apps/fortune/exchange-oracle/client/Dockerfile b/packages/apps/fortune/exchange-oracle/client/Dockerfile
index 46f448db16..157f83028f 100644
--- a/packages/apps/fortune/exchange-oracle/client/Dockerfile
+++ b/packages/apps/fortune/exchange-oracle/client/Dockerfile
@@ -1,5 +1,5 @@
# Using bullseye instead of slim because it needs Python and build tools for node-gyp
-FROM node:22.14-bullseye
+FROM node:24.13-bullseye
ARG APP_PATH=packages/apps/fortune/exchange-oracle/client
# Create app directory
diff --git a/packages/apps/fortune/exchange-oracle/server/Dockerfile b/packages/apps/fortune/exchange-oracle/server/Dockerfile
index ec1f060ae8..0ba4c90b53 100644
--- a/packages/apps/fortune/exchange-oracle/server/Dockerfile
+++ b/packages/apps/fortune/exchange-oracle/server/Dockerfile
@@ -1,4 +1,4 @@
-FROM node:22.14-slim
+FROM node:24.13-slim
ARG APP_PATH=packages/apps/fortune/exchange-oracle/server
# Create app directory
diff --git a/packages/apps/fortune/exchange-oracle/server/package.json b/packages/apps/fortune/exchange-oracle/server/package.json
index 5357d7d6c0..734825815e 100644
--- a/packages/apps/fortune/exchange-oracle/server/package.json
+++ b/packages/apps/fortune/exchange-oracle/server/package.json
@@ -31,16 +31,16 @@
"dependencies": {
"@human-protocol/logger": "workspace:*",
"@human-protocol/sdk": "workspace:*",
- "@nestjs/axios": "^3.1.2",
- "@nestjs/common": "^10.2.7",
- "@nestjs/config": "^3.1.1",
- "@nestjs/core": "^11.1.9",
- "@nestjs/passport": "^10.0.0",
- "@nestjs/platform-express": "^10.3.10",
- "@nestjs/schedule": "^4.0.1",
- "@nestjs/swagger": "^7.4.2",
+ "@nestjs/axios": "^4.0.1",
+ "@nestjs/common": "^11.1.12",
+ "@nestjs/config": "^4.0.2",
+ "@nestjs/core": "^11.1.12",
+ "@nestjs/passport": "^11.0.5",
+ "@nestjs/platform-express": "^11.1.12",
+ "@nestjs/schedule": "^6.1.0",
+ "@nestjs/swagger": "^11.2.5",
"@nestjs/terminus": "^11.0.0",
- "@nestjs/typeorm": "^10.0.1",
+ "@nestjs/typeorm": "^11.0.0",
"@types/passport-jwt": "^4.0.1",
"axios": "^1.3.1",
"body-parser": "^1.20.3",
@@ -56,20 +56,20 @@
"pg": "8.13.1",
"reflect-metadata": "^0.2.2",
"rxjs": "^7.2.0",
- "typeorm": "^0.3.25",
+ "typeorm": "^0.3.28",
"typeorm-naming-strategies": "^4.1.0"
},
"devDependencies": {
"@golevelup/ts-jest": "^0.6.1",
- "@nestjs/cli": "^10.3.2",
- "@nestjs/schematics": "^11.0.2",
- "@nestjs/testing": "^10.4.6",
+ "@nestjs/cli": "^11.0.16",
+ "@nestjs/schematics": "^11.0.9",
+ "@nestjs/testing": "^11.1.12",
"@types/body-parser": "^1",
"@types/express": "^4.17.13",
"@types/jest": "30.0.0",
"@types/jsonwebtoken": "^9.0.7",
"@types/node": "22.10.5",
- "@types/passport": "^0",
+ "@types/passport": "^1",
"@types/pg": "8.11.10",
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^8.46.3",
diff --git a/packages/apps/fortune/exchange-oracle/server/src/common/guards/signature.auth.spec.ts b/packages/apps/fortune/exchange-oracle/server/src/common/guards/signature.auth.spec.ts
index 07e48dd987..a7e1dd4612 100644
--- a/packages/apps/fortune/exchange-oracle/server/src/common/guards/signature.auth.spec.ts
+++ b/packages/apps/fortune/exchange-oracle/server/src/common/guards/signature.auth.spec.ts
@@ -121,7 +121,9 @@ describe('SignatureAuthGuard', () => {
const result = await guard.canActivate(context);
expect(result).toBeTruthy();
- expect(assignmentRepository.findOneById).toHaveBeenCalledWith(assignmentId);
+ expect(assignmentRepository.findOneById).toHaveBeenCalledWith(
+ assignmentId,
+ );
});
it('should throw BadRequest error if assignment id is not number', async () => {
diff --git a/packages/apps/fortune/exchange-oracle/server/src/common/guards/signature.auth.ts b/packages/apps/fortune/exchange-oracle/server/src/common/guards/signature.auth.ts
index aa1a6d68da..045015657f 100644
--- a/packages/apps/fortune/exchange-oracle/server/src/common/guards/signature.auth.ts
+++ b/packages/apps/fortune/exchange-oracle/server/src/common/guards/signature.auth.ts
@@ -42,7 +42,10 @@ export class SignatureAuthGuard implements CanActivate {
if (roles.includes(AuthSignatureRole.Worker)) {
if (!Number.isInteger(Number(data.assignment_id))) {
- throw new HttpException('Invalid assignment id', HttpStatus.BAD_REQUEST);
+ throw new HttpException(
+ 'Invalid assignment id',
+ HttpStatus.BAD_REQUEST,
+ );
}
const assignment = await this.assignmentRepository.findOneById(
diff --git a/packages/apps/fortune/exchange-oracle/server/src/common/interceptors/snake-case.ts b/packages/apps/fortune/exchange-oracle/server/src/common/interceptors/snake-case.ts
index 05b5b1ff1f..4e67b96cad 100644
--- a/packages/apps/fortune/exchange-oracle/server/src/common/interceptors/snake-case.ts
+++ b/packages/apps/fortune/exchange-oracle/server/src/common/interceptors/snake-case.ts
@@ -21,7 +21,13 @@ export class SnakeCaseInterceptor implements NestInterceptor {
}
if (request.query) {
- request.query = transformKeysFromSnakeToCamel(request.query);
+ const transformedQuery = transformKeysFromSnakeToCamel(request.query);
+ Object.defineProperty(request, 'query', {
+ value: transformedQuery,
+ configurable: true,
+ enumerable: true,
+ writable: true,
+ });
}
return next
diff --git a/packages/apps/fortune/recording-oracle/Dockerfile b/packages/apps/fortune/recording-oracle/Dockerfile
index 2b7cfc933b..d4a735b939 100644
--- a/packages/apps/fortune/recording-oracle/Dockerfile
+++ b/packages/apps/fortune/recording-oracle/Dockerfile
@@ -1,4 +1,4 @@
-FROM node:22.14-slim
+FROM node:24.13-slim
ARG APP_PATH=packages/apps/fortune/recording-oracle
# Create app directory
diff --git a/packages/apps/fortune/recording-oracle/package.json b/packages/apps/fortune/recording-oracle/package.json
index 2561c13d73..939caf57db 100644
--- a/packages/apps/fortune/recording-oracle/package.json
+++ b/packages/apps/fortune/recording-oracle/package.json
@@ -25,12 +25,12 @@
"dependencies": {
"@human-protocol/logger": "workspace:*",
"@human-protocol/sdk": "workspace:*",
- "@nestjs/axios": "^3.1.2",
- "@nestjs/common": "^10.2.7",
- "@nestjs/config": "^3.1.1",
- "@nestjs/core": "^11.1.9",
- "@nestjs/platform-express": "^10.3.10",
- "@nestjs/swagger": "^7.4.2",
+ "@nestjs/axios": "^4.0.1",
+ "@nestjs/common": "^11.1.12",
+ "@nestjs/config": "^4.0.2",
+ "@nestjs/core": "^11.1.12",
+ "@nestjs/platform-express": "^11.1.12",
+ "@nestjs/swagger": "^11.2.5",
"axios": "^1.3.1",
"body-parser": "^1.20.2",
"class-transformer": "^0.5.1",
@@ -43,9 +43,9 @@
"rxjs": "^7.2.0"
},
"devDependencies": {
- "@nestjs/cli": "^10.3.2",
- "@nestjs/schematics": "^11.0.2",
- "@nestjs/testing": "^10.4.6",
+ "@nestjs/cli": "^11.0.16",
+ "@nestjs/schematics": "^11.0.9",
+ "@nestjs/testing": "^11.1.12",
"@types/express": "^4.17.13",
"@types/node": "^22.15.16",
"eslint": "^9.39.1",
diff --git a/packages/apps/fortune/recording-oracle/src/common/interceptors/snake-case.ts b/packages/apps/fortune/recording-oracle/src/common/interceptors/snake-case.ts
index 05b5b1ff1f..4e67b96cad 100644
--- a/packages/apps/fortune/recording-oracle/src/common/interceptors/snake-case.ts
+++ b/packages/apps/fortune/recording-oracle/src/common/interceptors/snake-case.ts
@@ -21,7 +21,13 @@ export class SnakeCaseInterceptor implements NestInterceptor {
}
if (request.query) {
- request.query = transformKeysFromSnakeToCamel(request.query);
+ const transformedQuery = transformKeysFromSnakeToCamel(request.query);
+ Object.defineProperty(request, 'query', {
+ value: transformedQuery,
+ configurable: true,
+ enumerable: true,
+ writable: true,
+ });
}
return next
diff --git a/packages/apps/human-app/frontend/Dockerfile b/packages/apps/human-app/frontend/Dockerfile
index 7bb315121b..19dbccdad1 100644
--- a/packages/apps/human-app/frontend/Dockerfile
+++ b/packages/apps/human-app/frontend/Dockerfile
@@ -1,5 +1,5 @@
# Using bullseye instead of slim because it needs Python and build tools for node-gyp
-FROM node:22.14-bullseye
+FROM node:24.13-bullseye
ARG APP_PATH=packages/apps/human-app/frontend
# Create app directory
diff --git a/packages/apps/human-app/frontend/package.json b/packages/apps/human-app/frontend/package.json
index 3f28bd9c70..0b32ca3ef4 100644
--- a/packages/apps/human-app/frontend/package.json
+++ b/packages/apps/human-app/frontend/package.json
@@ -35,7 +35,7 @@
"@wagmi/core": "^2.17.1",
"date-fns": "^4.1.0",
"ethers": "^6.15.0",
- "i18next": "^23.8.2",
+ "i18next": "^25.8.0",
"jwt-decode": "^4.0.0",
"lodash": "^4.17.21",
"material-react-table": "3.0.1",
@@ -45,7 +45,7 @@
"query-string": "^9.0.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
- "react-hook-form": "^7.62.0",
+ "react-hook-form": "^7.71.1",
"react-i18next": "^15.1.0",
"react-imask": "^7.4.0",
"react-number-format": "^5.4.3",
@@ -55,7 +55,7 @@
"vite-plugin-svgr": "^4.2.0",
"wagmi": "^2.15.6",
"zod": "^4.0.17",
- "zustand": "^4.5.0"
+ "zustand": "^5.0.10"
},
"devDependencies": {
"@tanstack/eslint-plugin-query": "^5.60.1",
@@ -76,7 +76,6 @@
"eslint-plugin-react-refresh": "^0.4.11",
"husky": "^9.1.6",
"jsdom": "^25.0.1",
- "lint-staged": "^15.4.3",
"prettier": "^3.7.4",
"typescript": "^5.6.3",
"vite": "^6.2.4",
diff --git a/packages/apps/human-app/frontend/src/modules/worker/jobs/available-jobs/components/mobile/available-jobs-assign-job-button-mobile.tsx b/packages/apps/human-app/frontend/src/modules/worker/jobs/available-jobs/components/mobile/available-jobs-assign-job-button-mobile.tsx
index ea5216a575..3acd1102e0 100644
--- a/packages/apps/human-app/frontend/src/modules/worker/jobs/available-jobs/components/mobile/available-jobs-assign-job-button-mobile.tsx
+++ b/packages/apps/human-app/frontend/src/modules/worker/jobs/available-jobs/components/mobile/available-jobs-assign-job-button-mobile.tsx
@@ -1,20 +1,14 @@
import { t } from 'i18next';
-import { useParams } from 'react-router-dom';
import { TableButton } from '@/shared/components/ui/table-button';
import { useJobsNotifications } from '../../../hooks';
import { useAssignJobMutation } from '../../hooks/use-assign-job';
import { type AssignJobBody } from '../../../types';
-import { useAddThirstyfiInfoModal } from '../../hooks/use-add-thirstyfi-info-modal';
-
-const THIRSTYFI_ADDRESS = '0x5C08438d7d18734c5ee42ECAf81FB1D6A922A9cC';
export function AvailableJobsAssignJobButtonMobile({
assignJobPayload,
}: Readonly<{
assignJobPayload: AssignJobBody;
}>) {
- const { address: oracleAddress } = useParams<{ address: string }>();
- const { openModal } = useAddThirstyfiInfoModal();
const { onJobAssignmentError, onJobAssignmentSuccess } =
useJobsNotifications();
@@ -26,20 +20,12 @@ export function AvailableJobsAssignJobButtonMobile({
[`assignJob-${assignJobPayload.escrow_address}`]
);
- const isThirstyfi = oracleAddress === THIRSTYFI_ADDRESS;
-
return (
{
- if (isThirstyfi) {
- openModal({ ...assignJobPayload });
- } else {
- assignJobMutation(assignJobPayload);
- }
- }}
+ onClick={() => assignJobMutation(assignJobPayload)}
size="small"
sx={{
marginTop: '15px',
diff --git a/packages/apps/human-app/frontend/src/modules/worker/jobs/available-jobs/hooks/use-add-thirstyfi-info-modal.tsx b/packages/apps/human-app/frontend/src/modules/worker/jobs/available-jobs/hooks/use-add-thirstyfi-info-modal.tsx
deleted file mode 100644
index 49be0eaf6f..0000000000
--- a/packages/apps/human-app/frontend/src/modules/worker/jobs/available-jobs/hooks/use-add-thirstyfi-info-modal.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-import { useModal } from '@/shared/contexts/modal-context';
-import { ThirstyfiInfoModal } from '../thirstyfi-info-modal';
-
-interface AddThirstyfiInfoModalProps {
- escrow_address: string;
- chain_id: number;
-}
-
-export function useAddThirstyfiInfoModal() {
- const { openModal, closeModal } = useModal();
-
- return {
- openModal: ({ escrow_address, chain_id }: AddThirstyfiInfoModalProps) => {
- openModal({
- content: (
-
- ),
- });
- },
- };
-}
diff --git a/packages/apps/human-app/frontend/src/modules/worker/jobs/available-jobs/hooks/use-get-available-jobs-columns.tsx b/packages/apps/human-app/frontend/src/modules/worker/jobs/available-jobs/hooks/use-get-available-jobs-columns.tsx
index 41226f9e8f..753ad47200 100644
--- a/packages/apps/human-app/frontend/src/modules/worker/jobs/available-jobs/hooks/use-get-available-jobs-columns.tsx
+++ b/packages/apps/human-app/frontend/src/modules/worker/jobs/available-jobs/hooks/use-get-available-jobs-columns.tsx
@@ -2,7 +2,6 @@ import type { MRT_ColumnDef } from 'material-react-table';
import { t } from 'i18next';
import { Grid } from '@mui/material';
import { useMemo } from 'react';
-import { useParams } from 'react-router-dom';
import { getNetworkName } from '@/modules/smart-contracts/get-network-name';
import { Chip } from '@/shared/components/ui/chip';
import { TableButton } from '@/shared/components/ui/table-button';
@@ -17,18 +16,13 @@ import {
} from '../components';
import { type AvailableJob } from '../../types';
import { useAssignJobMutation } from './use-assign-job';
-import { useAddThirstyfiInfoModal } from './use-add-thirstyfi-info-modal';
const COL_SIZE = 100;
const COL_SIZE_LG = 200;
-const THIRSTYFI_ADDRESS = '0x5C08438d7d18734c5ee42ECAf81FB1D6A922A9cC';
export const useGetAvailableJobsColumns = (
chainIdsEnabled: number[]
): MRT_ColumnDef[] => {
- const { openModal } = useAddThirstyfiInfoModal();
- const { address: oracleAddress } = useParams<{ address: string }>();
-
return useMemo(
() => [
{
@@ -127,20 +121,12 @@ export const useGetAvailableJobsColumns = (
[`assignJob-${escrow_address}`]
);
- const isThirstyfi = oracleAddress === THIRSTYFI_ADDRESS;
-
return (
{
- if (isThirstyfi) {
- openModal({ escrow_address, chain_id });
- } else {
- assignJobMutation({ escrow_address, chain_id });
- }
- }}
+ onClick={() => assignJobMutation({ escrow_address, chain_id })}
>
{t('worker.jobs.selectJob')}
@@ -149,6 +135,6 @@ export const useGetAvailableJobsColumns = (
},
},
],
- [chainIdsEnabled, openModal, oracleAddress]
+ [chainIdsEnabled]
);
};
diff --git a/packages/apps/human-app/frontend/src/modules/worker/jobs/available-jobs/thirstyfi-info-modal.tsx b/packages/apps/human-app/frontend/src/modules/worker/jobs/available-jobs/thirstyfi-info-modal.tsx
deleted file mode 100644
index c8faa3bd4b..0000000000
--- a/packages/apps/human-app/frontend/src/modules/worker/jobs/available-jobs/thirstyfi-info-modal.tsx
+++ /dev/null
@@ -1,142 +0,0 @@
-import { z } from 'zod';
-import { FormProvider, useForm } from 'react-hook-form';
-import Stack from '@mui/material/Stack';
-import Typography from '@mui/material/Typography';
-import { useTranslation } from 'react-i18next';
-import { zodResolver } from '@hookform/resolvers/zod';
-import { useQueryClient } from '@tanstack/react-query';
-import Link from '@mui/material/Link';
-import { Button } from '@/shared/components/ui/button';
-import { Input } from '@/shared/components/data-entry/input';
-import { useIsMobile } from '@/shared/hooks/use-is-mobile';
-import { useJobsNotifications } from '../hooks';
-import { useAssignJobMutation } from './hooks/use-assign-job';
-
-interface ThirstyfiInfoModalProps {
- escrow_address: string;
- chain_id: number;
- onClose?: () => void;
-}
-
-export function ThirstyfiInfoModal({
- escrow_address,
- chain_id,
- onClose,
-}: ThirstyfiInfoModalProps) {
- const { t } = useTranslation();
- const isMobile = useIsMobile();
-
- const methods = useForm({
- defaultValues: {
- wallet_address: '',
- api_key: '',
- api_secret: '',
- },
- resolver: zodResolver(
- z.object({
- wallet_address: z
- .string()
- .trim()
- .length(42, t('thirstyfiModal.walletAddressError'))
- .regex(/^0x/, t('thirstyfiModal.walletAddressRegexError')),
- api_key: z.string().trim().min(1, t('validation.required')),
- api_secret: z.string().trim().min(1, t('validation.required')),
- })
- ),
- });
-
- const { onJobAssignmentError, onJobAssignmentSuccess } =
- useJobsNotifications();
- const queryClient = useQueryClient();
-
- const { mutate: assignJobMutation, isPending } = useAssignJobMutation(
- {
- onSuccess: () => {
- const queryKey = isMobile
- ? ['availableJobsInfinite']
- : ['availableJobs'];
- onJobAssignmentSuccess();
- void queryClient.invalidateQueries({ queryKey }).then(() => {
- methods.reset();
- onClose?.();
- });
- },
- onError: onJobAssignmentError,
- },
- [`assignJob-${escrow_address}`]
- );
-
- const onSubmit = (data: {
- wallet_address: string;
- api_key: string;
- api_secret: string;
- }) => {
- assignJobMutation({ escrow_address, chain_id, ...data });
- };
-
- const handleSubmit = (event: React.FormEvent) => {
- void methods.handleSubmit(onSubmit)(event);
- };
-
- return (
-
-
-
- );
-}
diff --git a/packages/apps/human-app/frontend/src/modules/worker/jobs/components/my-jobs-table-actions.tsx b/packages/apps/human-app/frontend/src/modules/worker/jobs/components/my-jobs-table-actions.tsx
index f625eca99b..886dc72875 100644
--- a/packages/apps/human-app/frontend/src/modules/worker/jobs/components/my-jobs-table-actions.tsx
+++ b/packages/apps/human-app/frontend/src/modules/worker/jobs/components/my-jobs-table-actions.tsx
@@ -35,9 +35,7 @@ export function MyJobsTableActions({
>
{t('worker.jobs.solve')}
- {job.escrow_address !== 'thirstyfi-task' && (
-
- )}
+
>
);
}
diff --git a/packages/apps/human-app/frontend/src/modules/worker/profile/components/api-key-data.tsx b/packages/apps/human-app/frontend/src/modules/worker/profile/components/api-key-data.tsx
index 55cb3efb93..a6fa175b58 100644
--- a/packages/apps/human-app/frontend/src/modules/worker/profile/components/api-key-data.tsx
+++ b/packages/apps/human-app/frontend/src/modules/worker/profile/components/api-key-data.tsx
@@ -10,7 +10,11 @@ import {
} from '../hooks/use-api-key-modals';
import { useGetExchangeApiKeys } from '../../hooks/use-exchange-api-keys';
-export function ApiKeyData() {
+export function ApiKeyData({
+ stakingExchangeError,
+}: {
+ stakingExchangeError?: string;
+}) {
const { isDarkMode } = useColorMode();
const { t } = useTranslation();
const { openModal: openEditApiKeyModal } = useEditApiKeyModal();
@@ -58,14 +62,14 @@ export function ApiKeyData() {
= Number(uiConfig?.minThreshold || '0');
+ useEffect(() => {
+ const stakingSummaryError =
+ stakingSummary?.on_chain_error || stakingSummary?.exchange_error;
+ if (stakingSummaryError && !isLoading && !isRefetching) {
+ showNotification({
+ type: TopNotificationType.WARNING,
+ message: stakingSummaryError,
+ });
+ }
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ }, [
+ isLoading,
+ isRefetching,
+ stakingSummary?.on_chain_error,
+ stakingSummary?.exchange_error,
+ ]);
+
useEffect(() => {
if (isRefetching || isLoading) return;
@@ -88,7 +112,7 @@ export function StakingInfo() {
) : (
+
+
+ {t('worker.profile.stakingInfo.howToCreateApiKeys')}
+
+
+ >
+ )}