Skip to content

Commit

Permalink
feat: debug deposit
Browse files Browse the repository at this point in the history
  • Loading branch information
pociej committed Jun 14, 2024
1 parent 41878ee commit 838f5d0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions backend/src/services/yagna/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
}
Expand All @@ -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(
Expand Down

0 comments on commit 838f5d0

Please sign in to comment.