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

Governance vue #375

Merged
merged 78 commits into from
Dec 2, 2024
Merged

Governance vue #375

merged 78 commits into from
Dec 2, 2024

Conversation

Duddino
Copy link
Member

@Duddino Duddino commented Aug 14, 2024

Abstract

This PR ports the Governance and Masternode tab in vue, massively simplifing the render logic.

TODO

  • Wait for UI Redesign #372 to be merged
  • Create proposal
  • Figure out when to update to fetch updates from the RPC node
  • Check mobile page
  • Clean up
  • Unit tests

Testing

  • Check the entirety of the masternode page
  • Check the entirety of governance page, including proposals

@Duddino Duddino self-assigned this Aug 14, 2024
Copy link

netlify bot commented Aug 14, 2024

Deploy Preview for cheery-moxie-4f1121 ready!

Name Link
🔨 Latest commit 215a3b1
🔍 Latest deploy log https://app.netlify.com/sites/cheery-moxie-4f1121/deploys/6745cdbec70d620008cacdfe
😎 Deploy Preview https://deploy-preview-375--cheery-moxie-4f1121.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@JSKitty
Copy link
Member

JSKitty commented Nov 4, 2024

Very minor design consistency change: the voting buttons are not the same size, "Yes" is smaller than "No".

Prod:
image

PR:
image

Copy link
Member

@panleone panleone left a comment

Choose a reason for hiding this comment

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

When creating the 10kPIVs masternode tx, the tab "Your Masternode Private Key..." doesnt get closed when pressing the X

Copy link
Member

@panleone panleone left a comment

Choose a reason for hiding this comment

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

When opening MPW getProposals throw errors

mpw.js:sourcemap:104538 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'filter')
    at Masternode.getProposals (mpw.js:sourcemap:104538:41)
    at async fetchProposals (mpw.js:sourcemap:67700:26)

Copy link
Member

@panleone panleone left a comment

Choose a reason for hiding this comment

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

Was able to successfully create a masternode, but there are two issues:
Last seen time is wrong;
When I try to vote a proposal I get the following error

index.js:159 Uncaught (in promise) TypeError: The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type object
    at from (index.js:159:1)
    at __webpack_modules__../node_modules/buffer/index.js.Buffer.from (index.js:174:1)
    at hexToBytes (utils.js:9:18)
    at Proxy.getSignedVoteMessage (masternode.js:371:26)
    at Proxy.vote (masternode.js:434:1)
    at vote (Governance.vue:178:47)

Copy link
Member

@JSKitty JSKitty left a comment

Choose a reason for hiding this comment

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

tACK 215a3b1

We'll revisit the mobile + iOS bugs prior to v2.1 release.

Copy link
Member

@panleone panleone left a comment

Choose a reason for hiding this comment

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

tACK 215a3b1

@JSKitty JSKitty merged commit 7ea4ab6 into PIVX-Labs:master Dec 2, 2024
5 of 6 checks passed
Duddino added a commit to Duddino/MyPIVXWallet that referenced this pull request Dec 2, 2024
* Initial rewrite

* Desktop governance page

* Finish governance table for mobile

* Change useSettings to store

* Add use_masternode

* Split masternode component and implement CreateMasternode

* Move import wallet inside RestoreWallet component

* Add import masternode form

* Add import wallet box

* Fix masternode import page

* Add controller

* Finish mn controller

* Add create proposal modal

* Add automatic proposal confirmation

* Fix start error

* Add Create Proposal row

* Add proposal finalisation

* Add vote popup

* Flipdown reactive

* Split BudgetAllocated and MonthlyBudget components

Split BudgetAllocated and MonthlyBudget components
Fix the render for mobile

* Clean up some dom elements

* Fix over budget calculation

* Add i18n mock

* Add governance tests and test-ids.

Fixed some inconsistencies found when testing

* Remove unused component

* Fix stake balance clearing mocks instead of returing function

* Improve translation mock

* Add masternode component tests

* Re-apply PIVX-Labs#394 to vue (Remove governance dots on mobile)

* Fix minor merge errors

* Fix local proposal status

* Add actual currency

* Add finalizeProposalButton v-if to tests

* Clean up code

* Remove should be fine

* Clean up masternode code and update when tab is clicked

* Update governance when tab is clicked

* Remove legacy exports

* Add mastenrode and governance tab to tests

* Fix test not passing on machines with different timezones

* Fix eslint warnings

* Apply PIVX-Labs#392 to vue

* Remove console.logs

* Fix eslint

* Fix tests

* Change createAlert

* Fix overbudget bug

* Fix undefined alert

* Fix post-merge import

* Add alert when trying to vote without a masternode

* Open explorer when clicking on address

* Remove openExplorer event

* Update test

* Revert createMasternode logic

* Teleport confirmVoteModal and style cancel button

* Fix teleport test

* Fix mn starting not working

* Fix button height being different

* Fix close bug

* Fix vote

* Readd getBlockbookUrl

* Update possible UTXOs on tab click and when creating mn

* Add missing import

* Fix buttons

* Try remove this idk

---------

Co-authored-by: Duddino Gatto <[email protected]>
Co-authored-by: JSKitty <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

3 participants