rocket-pool / smartnode

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

Added a check to handle bond reductions being disabled #642

Closed thomaspanf closed 1 month ago

thomaspanf commented 1 month ago

When bond reductions are disabled, rocketpool minipool reduce-bond doesn't populate data fields in the API response. This PR addresses #637 by adding a check in the CLI to properly handle the case of bond reductions being disabled.

github-actions[bot] commented 1 month ago

Coverage Report

jshufro commented 1 month ago

run git cherry-pick b2b340e6c25d785793eb45dfc42d7ef3c1d16327 to add the commit that fixes the linter, if you want to get it to shut up

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/rocketpool-cli/commands/minipool 1.82% (-0.01%) :thumbsdown:
github.com/rocket-pool/smartnode/v2/rocketpool-daemon/common/rewards 1.43% (ø)

Coverage by file ### Changed files (no unit tests) | Changed File | Coverage Δ | Total | Covered | Missed | :robot: | |--------------|------------|-------|---------|--------|---------| | github.com/rocket-pool/smartnode/v2/rocketpool-cli/commands/minipool/reduce-bond.go | 0.00% (ø) | 547 (+24) | 0 | 547 (+24) | | | github.com/rocket-pool/smartnode/v2/rocketpool-daemon/common/rewards/utils.go | 3.50% (ø) | 1484 | 52 | 1432 | | _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._