Skip to content

Commit

Permalink
Fix seconds being interpreted as floating point. They need to be inte…
Browse files Browse the repository at this point in the history
…ger to be accepted by config
  • Loading branch information
scx1332 committed Feb 25, 2025
1 parent ea6d4de commit 3f33d82
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/golem-network/golem-network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ export class GolemNetwork {

return this.payment.createAllocation({
budget,
expirationSec: order.market.rentHours * (60 + EXPIRATION_BUFFER_MINUTES) * 60,
expirationSec: Math.round(order.market.rentHours * (60 + EXPIRATION_BUFFER_MINUTES) * 60),
});
}

Expand Down Expand Up @@ -503,7 +503,7 @@ export class GolemNetwork {
const agreement = await this.market.signAgreementFromPool(
proposalPool,
{
expirationSec: order.market.rentHours * 60 * 60,
expirationSec: Math.round(order.market.rentHours * 60 * 60),
},
signal,
);
Expand Down Expand Up @@ -626,7 +626,7 @@ export class GolemNetwork {
});
subscription = proposalPool.readFrom(draftProposal$);

const rentSeconds = order.market.rentHours * 60 * 60;
const rentSeconds = Math.round(order.market.rentHours * 60 * 60);

resourceRentalPool = this.rental.createResourceRentalPool(proposalPool, allocation, {
poolSize,
Expand Down

0 comments on commit 3f33d82

Please sign in to comment.