You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d4244f6
Browse filesBrowse the repository at this point in the historyBrowse files
Fix: label the vault countdown "Unlocks Start In", then show "% Unlocked" (#122)
* Fix: label the vault countdown "Unlocks Start In" until the unlock begins
Since #121 the countdown runs to the start of the unlock, after which tokens release linearly every
block. Under the old "Unlocks In" label, "21 days" read as the whole vault unlocking in 21 days.
Show "Unlocks Start In" while that countdown is running. Once the unlock has started the value is
"Available now" (or "Milestone still locked" for a milestone vault), and the label goes back to
"Unlocks In": "Unlocks Start In: Available now" would read oddly. NCATP vaults count down to a full
unlock at their withdrawal timestamp, so they keep "Unlocks In".
* Fix: show "% Unlocked" once a vault's unlock has started
After the unlock starts, the card showed "Unlocks In: Available now", which says nothing about how far
through the schedule the vault is. Show "% Unlocked" with the share of the allocation the schedule has
released instead, computed by useVestingCalculation so it matches the vesting chart in the details
modal. The share is rounded down to 0.01% so no vault reads 100% before its last token unlocks.
A milestone vault whose milestone is not achieved follows the same schedule but can release nothing,
so it shows the same percentage with "Milestone still locked" underneath, and the tooltip says the
unlocked tokens can't be withdrawn yet. Previously "Milestone still locked" replaced the value.
Vaults without a lock schedule, and NCATP vaults, keep "Unlocks In" and their existing values.
0 commit comments