Skip to content

Commit

Permalink
Merge pull request #2780 from IntersectMBO/develop
Browse files Browse the repository at this point in the history
fix(#2778): exception when there is no voting power for given stake key
  • Loading branch information
MSzalowski authored Jan 28, 2025
2 parents 631e886 + 7859cc2 commit 51df9e8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion govtool/backend/src/VVA/AdaHolder.hs
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,9 @@ getStakeKeyVotingPower stakeKey = withPool $ \conn -> do
Text.putStrLn ("couldn't fetch voting power for stake key: " <> stakeKey)
return 0
Right [(votingPower,_)] -> return $ floor votingPower
_ -> error ("multiple voting power entries for stake key: " <> unpack stakeKey)
Right [] -> do
Text.putStrLn ("No voting power found for stake key: " <> stakeKey)
return 0
Right _ -> do
Text.putStrLn ("Unexpected result for stake key: " <> stakeKey)
return 0

0 comments on commit 51df9e8

Please sign in to comment.