rocket-pool / smartnode

The CLI package for Rocket Pool smart nodes.
GNU General Public License v3.0
150 stars 112 forks source link

V2 stake/deposit warning #660

Closed thomaspanf closed 1 month ago

thomaspanf commented 1 month ago

Adds the warning to rp node stake-rpl and rp node deposit

Your voting power hasn't been initialized yet. Please visit https://docs.rocketpool.net/guides/houston/participate#initializing-voting to learn more.
NOTE: by staking RPL, your node will automatically initialize voting power to itself. If you would like to delegate your on-chain voting power, you should run the command `rocketpool pdao initialize-voting` before staking RPL.
Would you like to continue? [y/n]
n

stake-rpl.go and deposit.go only displays this warning after 1.3.1 hotfix has been deployed. This PR requires the following change from rocketpool-go:tx-refactor https://github.com/rocket-pool/rocketpool-go/pull/31

github-actions[bot] commented 1 month ago

Coverage Report

github-actions[bot] commented 1 month ago

Merging this branch will decrease overall coverage

Impacted Packages Coverage Δ :robot:
github.com/rocket-pool/smartnode/v2/client 0.94% (-0.01%) :thumbsdown:
github.com/rocket-pool/smartnode/v2/rocketpool-cli/commands/node 0.01% (-0.00%) :thumbsdown:
github.com/rocket-pool/smartnode/v2/rocketpool-daemon/api/network 0.00% (ø)
github.com/rocket-pool/smartnode/v2/rocketpool-daemon/api/pdao 0.00% (ø)
github.com/rocket-pool/smartnode/v2/rocketpool-daemon/common/state 0.00% (ø)
github.com/rocket-pool/smartnode/v2/shared/types/api 0.00% (ø)

Coverage by file ### Changed files (no unit tests) | Changed File | Coverage Δ | Total | Covered | Missed | :robot: | |--------------|------------|-------|---------|--------|---------| | github.com/rocket-pool/smartnode/v2/client/network.go | 0.73% (**-0.04%**) | 137 (+7) | 1 | 136 (+7) | :thumbsdown: | | github.com/rocket-pool/smartnode/v2/client/pdao.go | 0.28% (**-0.00%**) | 358 (+6) | 1 | 357 (+6) | :thumbsdown: | | github.com/rocket-pool/smartnode/v2/rocketpool-cli/commands/node/deposit.go | 0.00% (ø) | 1194 (+27) | 0 | 1194 (+27) | | | github.com/rocket-pool/smartnode/v2/rocketpool-cli/commands/node/stake-rpl.go | 0.00% (ø) | 542 (+22) | 0 | 542 (+22) | | | github.com/rocket-pool/smartnode/v2/rocketpool-cli/commands/node/utils.go | 0.00% (ø) | 1349 (+67) | 0 | 1349 (+67) | | | github.com/rocket-pool/smartnode/v2/rocketpool-daemon/api/network/handler.go | 0.00% (ø) | 39 | 0 | 39 | | | github.com/rocket-pool/smartnode/v2/rocketpool-daemon/api/network/is-hotfix-deployed.go | 0.00% (ø) | 90 (+90) | 0 | 90 (+90) | | | github.com/rocket-pool/smartnode/v2/rocketpool-daemon/api/pdao/handler.go | 0.00% (ø) | 39 | 0 | 39 | | | github.com/rocket-pool/smartnode/v2/rocketpool-daemon/api/pdao/is-voting-initialized.go | 0.00% (ø) | 112 (+112) | 0 | 112 (+112) | | | github.com/rocket-pool/smartnode/v2/rocketpool-daemon/common/state/update-checks.go | 0.00% (ø) | 141 (+37) | 0 | 141 (+37) | | | github.com/rocket-pool/smartnode/v2/shared/types/api/network.go | 0.00% (ø) | 148 | 0 | 148 | | | github.com/rocket-pool/smartnode/v2/shared/types/api/pdao.go | 0.00% (ø) | 0 | 0 | 0 | | _Please note that the "Total", "Covered", and "Missed" counts above refer to ***code statements*** instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code._