mento-protocol / governance-ui

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

Feat: Extend Lock #215

Closed denviljclarke closed 1 month ago

denviljclarke commented 1 month ago

Description

This PR adds functionality to allow users to extend their mentor lock. It also changes how locks are thought of and displayed in the UI. We no longer display a list of all the lock actions taken by the user; we now only have three things, along with buttons to either withdraw unlocked mentors or extend their current lock expiration date. One thing to note is this function can also add amounts to a lock; we don't support that with this implementation; this is strictly extending an existing lock with/ the same locked amount.

Multiple Locks Our plan for the UI is not to support creating multiple locks. However, a user can technically create multiple locks by calling the contract directly. We need to decide how we handle users who have them because the current implementation of relocking cannot support them. This implementation disables relocking for such users.

For reviewers -

There are serval accounts in the testathon deployment doc which have extendable locks. One of them to go through the extend flow.

Other changes

Changed all 'my voting power' references to just 'voting power'.

Disable the locking component for users who already have locks. In it's previous state this component allows users to create multiple locks, which we don't want.

Adding

Tested

Used the UI on both mobile & extended locks.

Related issues

vercel[bot] commented 1 month 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 Aug 12, 2024 2:23pm