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.
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