Repository navigation
Commit 1b54ec0
authored
Fix: count "Unlocks In" down to the start of the unlock, not its end (#121)
The Token Vault card counted down to globalLock.endTime, the end of the linear unlock. For the
employee and investor vaults, whose unlock starts on Nov 13 and then runs for two years, that showed
"751 days" when tokens actually start unlocking in about three weeks: it was reporting the time until
the last token unlocks, i.e. the vesting duration plus the wait.
Count down to the cliff instead. It is the first moment any tokens become claimable, and after it the
lock releases tokens every block, so "Available now" is the right reading from then on. The cliff is
never before startTime and equals it when a schedule has no cliff. This matches what the vesting
chart already shows as "Unlock Start Time".
ATPCard carried its own copy of the same end-of-vesting countdown; it now uses the shared helper.
The tooltip, which described the old behaviour, is reworded. NCATP vaults keep their separate
withdrawal-timestamp countdown, and MATP vaults still show "Milestone still locked" once the time
lock has passed.
Fixes A-24561 parent 551a06f commit 1b54ec0
3 files changed
Lines changed: 12 additions & 26 deletions
File tree
- staking-dashboard/src
- components
- ATPCard
- ATPStakingCard
- utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | 116 | | |
137 | 117 | | |
138 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
639 | 639 | | |
640 | 640 | | |
641 | 641 | | |
642 | | - | |
| 642 | + | |
643 | 643 | | |
644 | 644 | | |
645 | 645 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
48 | 54 | | |
49 | 55 | | |
50 | 56 | | |
51 | 57 | | |
52 | 58 | | |
53 | | - | |
| 59 | + | |
54 | 60 | | |
55 | 61 | | |
56 | 62 | | |
57 | | - | |
58 | | - | |
| 63 | + | |
| 64 | + | |
59 | 65 | | |
60 | 66 | | |
61 | 67 | | |
| |||
0 commit comments