Skip to content

Commit

Permalink
Merge pull request #6 from ixofoundation/develop
Browse files Browse the repository at this point in the history
fix: fix date calculation
  • Loading branch information
Michael-Ixo authored Sep 6, 2023
2 parents ab0b786 + a696cab commit 57a23bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/granter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class IxoFeegrant {
);
}

async feegrant(grantee: string, durationInDays?: number) {
async feegrant(grantee: string, durationInDays = 31) {
// check if client not initiated yet redo it and await
if (!this.signingClient || !this.wallet) await this.init();

Expand All @@ -57,7 +57,7 @@ export class IxoFeegrant {
// },
// ],
expiration: utils.proto.toTimestamp(
new Date(now.setDate(now.getDate() + durationInDays ?? 31)), // default: 31 days from now
new Date(now.setDate(now.getDate() + durationInDays)),
),
}),
).finish(),
Expand Down

0 comments on commit 57a23bf

Please sign in to comment.