Skip to content

Commit 494aef8

Browse files
committed
show rate duration
1 parent aa1681a commit 494aef8

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

types/adapters.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export type CliffAdapterResult = {
4949
start: number;
5050
amount: number;
5151
dateFormat?: string;
52+
isUnlock?: boolean;
5253
};
5354
export type LinearAdapterResult = {
5455
type: "linear";
@@ -165,6 +166,7 @@ export type Event = {
165166
noOfTokens: number[];
166167
category: string;
167168
unlockType: "cliff" | "linear";
169+
rateDurationDays?: number;
168170
};
169171

170172
export type AllocationDetail = {

utils/events.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ export function addResultToEvents(
6161
timestamp: l2.start,
6262
noOfTokens: [thisRate, nextRate],
6363
category: sectionToCategory[section] || 'Uncategorized',
64-
unlockType: "linear"
64+
unlockType: "linear",
65+
rateDurationDays: (l2.end - l2.start) / 86400
6566
});
6667
}
6768
}
@@ -80,7 +81,8 @@ export function addResultToEvents(
8081
timestamp: l.start,
8182
noOfTokens: [0, initialRate],
8283
category: sectionToCategory[section] || 'Uncategorized',
83-
unlockType: "linear"
84+
unlockType: "linear",
85+
rateDurationDays: (l.end - l.start) / 86400
8486
});
8587
}
8688
}

0 commit comments

Comments
 (0)