From 838f5d0ea0b78f2a950fccec5ba05cc3ff06dcf7 Mon Sep 17 00:00:00 2001 From: pociej Date: Fri, 14 Jun 2024 14:25:08 +0200 Subject: [PATCH] feat: debug deposit #62 --- backend/src/services/yagna/service.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/src/services/yagna/service.ts b/backend/src/services/yagna/service.ts index 7eaa47f..41ea798 100644 --- a/backend/src/services/yagna/service.ts +++ b/backend/src/services/yagna/service.ts @@ -142,7 +142,7 @@ export class Yagna { async createUserAllocation(userId: string) { const userService = container.cradle.userService; const userDeposit = await userService.getCurrentDeposit(userId); - + console.log("creating allocation userDeposit", userDeposit); if (!userDeposit) { throw new Error({ code: ErrorCode.NO_DEPOSIT }); } @@ -160,7 +160,9 @@ export class Yagna { // @ts-ignore spender: userDeposit.spender, }, - timeout: new Date(Number(userDeposit.validTo) * 1000).toISOString(), + timeout: new Date( + Number(userDeposit.validTo) * 1000 - 1000 + ).toISOString(), }); container.cradle.userService.setCurrentAllocationId(