Skip to content
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

feat: adds voting power management #5337

Merged
merged 7 commits into from Dec 5, 2022
Merged

Conversation

jeeanribeiro
Copy link
Contributor

Summary

Adds voting power management UI and functionality

Changelog

- Adds votingPower property to IAccountState
- Adds getVotingPower, increaseVotingPower, decreaseVotingPower in IAccount
- Adds ManageVotingPowerPopup component
- Adds voting power sync logic
- Adds set voting power logic

Relevant Issues

closes #5262

Testing

Platforms

  • Desktop
    • MacOS
    • Linux
    • Windows
  • Mobile
    • iOS
    • Android

Checklist

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or modified tests that prove my changes work as intended
  • I have verified that new and existing unit tests pass locally with my changes
  • I have verified that my latest changes pass CI workflows for testing and linting
  • I have made corresponding changes to the documentation

@jeeanribeiro jeeanribeiro added type:feature Adding a new feature or functionality context:governance stardust Related to the Stardust Protocol labels Dec 3, 2022
@jeeanribeiro jeeanribeiro self-assigned this Dec 3, 2022
Copy link
Contributor

@Tuditi Tuditi left a comment

Choose a reason for hiding this comment

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

The flows don't work if you have a locale in another language (due to the different comma). I think it's a problem with the AssetAmountInput. So I'll open a separate issue for that

<TextHint info text={localize('popups.manageVotingPower.hint')} />
</div>
<div class="flex flex-row flex-nowrap w-full space-x-4">
<Button outline classes="w-full" disabled={$selectedAccount.isTransferring} onClick={handleBack}>
Copy link
Contributor

Choose a reason for hiding this comment

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

As a minor suggestion, it is slightly better for performance + readability, to extract the property of the $selectedAccount.isTransferring variable to a separate reactive variable (i.e.: isTransferring). Then whenever something changes on the selectedAccount object, the reactive code is only run once

Copy link
Contributor

@Tuditi Tuditi left a comment

Choose a reason for hiding this comment

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

LGTM!

@Tuditi Tuditi merged commit feb79a4 into stardust-develop Dec 5, 2022
@Tuditi Tuditi deleted the feat/manage-voting-power branch December 5, 2022 17:57
@jeeanribeiro jeeanribeiro linked an issue Dec 17, 2022 that may be closed by this pull request
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
context:governance stardust Related to the Stardust Protocol type:feature Adding a new feature or functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Task]: Implement Governance voting power dashboard pane
2 participants