From d0889a21964a68afcde7544e6653655132e9aff5 Mon Sep 17 00:00:00 2001 From: pociej Date: Sun, 21 Apr 2024 07:27:58 +0200 Subject: [PATCH] feat: use proper version of dependecies #49 --- .gitmodules | 2 +- backend/src/services/yagna/routes.ts | 9 ++++++++- frontend/src/components/extendDepositForm.tsx | 2 +- golem-js | 2 +- golem-sdk-task-executor | 2 +- pnpm-lock.yaml | 10 +++++++--- 6 files changed, 19 insertions(+), 8 deletions(-) diff --git a/.gitmodules b/.gitmodules index b2f9885..c8beb81 100644 --- a/.gitmodules +++ b/.gitmodules @@ -14,4 +14,4 @@ [submodule "yagna"] path = yagna url = https://github.com/golemfactory/yagna.git - branch = js-sdk-deposit-poc \ No newline at end of file + branch = deposits \ No newline at end of file diff --git a/backend/src/services/yagna/routes.ts b/backend/src/services/yagna/routes.ts index d662e55..fcd5c08 100644 --- a/backend/src/services/yagna/routes.ts +++ b/backend/src/services/yagna/routes.ts @@ -8,7 +8,14 @@ export const Yagna = fastifyPlugin((fastify: FastifyInstance, opts, done) => { handler: async (request, reply) => { const requestUser = request.user; const Yagna = container.cradle.Yagna; - await Yagna.createExecutor(requestUser._id); + try { + await Yagna.createExecutor(requestUser._id); + } catch (e) { + console.log("error", e); + reply.code(500).send({ + message: "Unable to create executor", + }); + } const allocation = await Yagna.getUserAllocation(requestUser._id); console.log("allocation", allocation); if (!allocation) { diff --git a/frontend/src/components/extendDepositForm.tsx b/frontend/src/components/extendDepositForm.tsx index a777d97..4ae4170 100644 --- a/frontend/src/components/extendDepositForm.tsx +++ b/frontend/src/components/extendDepositForm.tsx @@ -47,7 +47,7 @@ export const ExtendDepositForm = ({ useEffect(() => { if (currentDeposit) { - setNewValidToTimestamp(currentDeposit.validTo); + setNewValidToTimestamp(Number(currentDeposit.validTo)); } }, [currentDeposit]); diff --git a/golem-js b/golem-js index 40a1ff2..2d9b6ac 160000 --- a/golem-js +++ b/golem-js @@ -1 +1 @@ -Subproject commit 40a1ff2eb1ce01cb3e93a9b9af7c859815707c2a +Subproject commit 2d9b6ac1236d9b2f584487e86d7cf3d0f0148980 diff --git a/golem-sdk-task-executor b/golem-sdk-task-executor index 1f4ef22..c5e9dfe 160000 --- a/golem-sdk-task-executor +++ b/golem-sdk-task-executor @@ -1 +1 @@ -Subproject commit 1f4ef224431c48f96be92784962cfeda227d5958 +Subproject commit c5e9dfe705aed0b687798a9faf22ec15b0d4b956 diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0f0dd4b..056dd8d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -303,7 +303,7 @@ importers: version: 0.4.4(rollup@4.14.0) '@rollup/plugin-typescript': specifier: ^11.1.6 - version: 11.1.6(rollup@4.14.0)(typescript@5.4.3) + version: 11.1.6(rollup@4.14.0)(tslib@2.6.2)(typescript@5.4.3) '@types/async-lock': specifier: ^1.4.2 version: 1.4.2 @@ -412,6 +412,9 @@ importers: tsconfig-paths: specifier: ^4.2.0 version: 4.2.0 + tslib: + specifier: ^2.6.2 + version: 2.6.2 tslint-config-prettier: specifier: ^1.18.0 version: 1.18.0 @@ -472,7 +475,7 @@ importers: version: 0.4.4(rollup@4.14.0) '@rollup/plugin-typescript': specifier: ^11.1.6 - version: 11.1.6(rollup@4.14.0)(typescript@5.4.3) + version: 11.1.6(rollup@4.14.0)(tslib@2.6.2)(typescript@5.4.3) '@types/jest': specifier: ^29.5.12 version: 29.5.12 @@ -4646,7 +4649,7 @@ packages: terser: 5.30.3 dev: true - /@rollup/plugin-typescript@11.1.6(rollup@4.14.0)(typescript@5.4.3): + /@rollup/plugin-typescript@11.1.6(rollup@4.14.0)(tslib@2.6.2)(typescript@5.4.3): resolution: {integrity: sha512-R92yOmIACgYdJ7dJ97p4K69I8gg6IEHt8M7dUBxN3W6nrO8uUxX5ixl0yU/N3aZTi8WhPuICvOHXQvF6FaykAA==} engines: {node: '>=14.0.0'} peerDependencies: @@ -4662,6 +4665,7 @@ packages: '@rollup/pluginutils': 5.1.0(rollup@4.14.0) resolve: 1.22.8 rollup: 4.14.0 + tslib: 2.6.2 typescript: 5.4.3 dev: true