Skip to content

feat: add Increase Stake Modal #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Feb 4, 2025
Merged

feat: add Increase Stake Modal #13

merged 20 commits into from
Feb 4, 2025

Conversation

sul-igr
Copy link
Contributor

@sul-igr sul-igr commented Jan 6, 2025

task link

Todo:
[x] Check if the functionality is ok
[x] decide where to put the button for opening the modal

@sul-igr sul-igr requested a review from microHoffman January 6, 2025 00:02
Copy link

github-actions bot commented Jan 6, 2025

Increase Duration (in epochs)
</span>
</div>
<VueSlider
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: did you check if it's possible to make the slider values somehow non-linear in the switch between 5 years and 10 years, so there is actually bigger distance on the slider between the 5 years and 10 years prolong option?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't sure how to make this look good, will separate into new task

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bugs related to handling of transaction:

  1. button is not in disabled state when transaction is pending
  2. UI does not reflect updated positions, it should trigger refetch after the tx is completed
  3. we should show some success message to user

For handling the TX and check for confirmation, we can probably copy our sendTransaction method from FE repo that should also take care of the contract wallets compatibility?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's separate the showing of the burnt stake to new task together with the success message (maybe add the toast from fe repo?)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after i've prolonged the duration of the stake, i got shown this message that I get the voting power in the next epoch... is that a correct behavior? if yes, then owner lose the voting power for the duration between increase and next epoch, right @ashhanai ? if yes, we should maybe put some note or something to inform the user that they will temporarily lose their voting power on that position?

image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They will not lose it as the voting power decrease is also happening in the next epoch. The current epoch is always immutable, you cannot increase nor decrease its voting power.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@darklight81 for now let's add to the modal some note like "Your voting power will change in next epoch ([time till next epoch]), until then your voting power will stay the same"

Copy link
Contributor

@microHoffman microHoffman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK

@sul-igr sul-igr merged commit 7b9a21a into master Feb 4, 2025
1 check passed
@sul-igr sul-igr deleted the increase-stake branch February 4, 2025 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants