Skip to content

Commit 8673a95

Browse files
committed
Remove debug logs and add comments for time period constants in context and time utility files
1 parent 78ec2fa commit 8673a95

File tree

2 files changed

+4
-8
lines changed
  • packages/gator-permissions-snap/src

2 files changed

+4
-8
lines changed

packages/gator-permissions-snap/src/permissions/nativeTokenPeriodic/context.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,13 +177,9 @@ export async function buildContext({
177177
decimals,
178178
});
179179

180-
console.log('zzzz', data);
181-
182180
const periodType = getClosestTimePeriod(BigInt(data.periodDuration));
183181
const periodDuration = TIME_PERIOD_TO_SECONDS[periodType].toString();
184182

185-
console.log('yyyyy', { periodType, periodDuration });
186-
187183
const startTime = data.startTime ?? Math.floor(Date.now() / 1000);
188184

189185
const tokenAddressCaip19 = toCaipAssetType(

packages/gator-permissions-snap/src/utils/time.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -255,10 +255,10 @@ export const getStartOfNextDayUTC = (): number => {
255255
export const TIME_PERIOD_TO_SECONDS: Record<TimePeriod, bigint> = {
256256
[TimePeriod.HOURLY]: 60n * 60n, // 3,600(seconds)
257257
[TimePeriod.DAILY]: 60n * 60n * 24n, // 86,400(seconds)
258-
[TimePeriod.WEEKLY]: 60n * 60n * 24n * 7n, // 604,800(seconds)
259-
[TimePeriod.BIWEEKLY]: 60n * 60n * 24n * 14n, // 1,209,600(seconds)
260-
[TimePeriod.MONTHLY]: 60n * 60n * 24n * 30n, // 2,592,000(seconds)
261-
[TimePeriod.YEARLY]: 60n * 60n * 24n * 365n, // 31,536,000(seconds)
258+
[TimePeriod.WEEKLY]: 60n * 60n * 24n * 7n, // 604,800(seconds), 7 days
259+
[TimePeriod.BIWEEKLY]: 60n * 60n * 24n * 14n, // 1,209,600(seconds), 14 days
260+
[TimePeriod.MONTHLY]: 60n * 60n * 24n * 30n, // 2,592,000(seconds), 30 days
261+
[TimePeriod.YEARLY]: 60n * 60n * 24n * 365n, // 31,536,000(seconds), 365 days
262262
};
263263

264264
/**

0 commit comments

Comments
 (0)