mento-protocol / governance-ui

An open source interface for the Mento protocol governance
https://governance.mento.org
0 stars 0 forks source link

feat: fix time calculation for timelock and voting period #154

Closed philbow61 closed 3 months ago

philbow61 commented 3 months ago

This PR fixes the display of the voting period and the timelock period. The existing code had an error with a check on the rawParam.result !== undefined since the input had no .result attribute, the code always returned null.

Since the functions calling the formatParam function have their check for the param not being undefined I removed the check.

I also added a check for the period in days being 0. If that's the case the period is displayed in minutes to support our testnet setup.

Fixes #149

vercel[bot] commented 3 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
governance-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 30, 2024 10:24pm