Skip to content

Commit

Permalink
Merge branch 'rocket-pool:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Nimja1234 authored Apr 30, 2024
2 parents bac8696 + 79ab7da commit 8d49a58
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion rocketpool-cli/pdao/get-voting-power.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
const (
colorBlue string = "\033[36m"
colorReset string = "\033[0m"
colorGreen string = "\033[32m"
)

func getVotePower(c *cli.Context) error {
Expand Down Expand Up @@ -44,7 +45,7 @@ func getVotePower(c *cli.Context) error {
}

// Print Results
fmt.Println("== Node Voting Power ==")
fmt.Printf("%s== Node Voting Power ==%s\n", colorGreen, colorReset)
if status.IsVotingInitialized {
fmt.Println("The node has been initialized for onchain voting.")

Expand Down
4 changes: 2 additions & 2 deletions rocketpool/api/pdao/get-voting-power.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ func getVotePower(c *cli.Context) (*api.GetPDAOVotePowerResponse, error) {
}

// Cast to uint32
blockNumber32 := uint32(blockNumber)
response.BlockNumber = uint32(blockNumber)

// Check voting power
response.VotingPower, err = network.GetVotingPower(rp, nodeAccount.Address, blockNumber32, nil)
response.VotingPower, err = network.GetVotingPower(rp, nodeAccount.Address, response.BlockNumber, nil)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion shared/types/api/pdao.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,5 +410,5 @@ type GetPDAOVotePowerResponse struct {
VotingPower *big.Int `json:"votingPower"`
OnchainVotingDelegate common.Address `json:"onchainVotingDelegate"`
OnchainVotingDelegateFormatted string `json:"onchainVotingDelegateFormatted"`
BlockNumber uint64 `json:"blockNumber"`
BlockNumber uint32 `json:"blockNumber"`
}

0 comments on commit 8d49a58

Please sign in to comment.