File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -296,22 +296,22 @@ getVotes (unHexText -> dRepId) selectedTypes sortMode mSearch = do
296296 CacheEnv {dRepGetVotesCache} <- asks vvaCache
297297 (votes, proposals) <- cacheRequest dRepGetVotesCache dRepId $ DRep. getVotes dRepId []
298298
299- let voteMapByTxHash = Map. fromList $
300- map (\ vote -> (pack $ Prelude. takeWhile ( /= ' # ' ) (unpack $ Types. voteGovActionId vote) , vote)) votes
299+ let voteMapById = Map. fromList $
300+ map (\ vote -> (Types. voteGovActionId vote, vote)) votes
301301
302302 processedProposals <- filter (isProposalSearchedFor mSearch) <$>
303303 mapSortAndFilterProposals selectedTypes sortMode proposals
304304
305- return $
305+ return
306306 [ VoteResponse
307307 { voteResponseVote = voteToResponse vote
308308 , voteResponseProposal = proposalResponse
309309 }
310310 | proposalResponse <- processedProposals
311- , let txHash = unHexText (proposalResponseTxHash proposalResponse)
312- , Just vote <- [Map. lookup txHash voteMapByTxHash ]
311+ , let govActionId = unHexText (proposalResponseTxHash proposalResponse) <> " # " <> pack ( show $ proposalResponseIndex proposalResponse)
312+ , Just vote <- [Map. lookup govActionId voteMapById ]
313313 ]
314-
314+
315315drepInfo :: App m => HexText -> m DRepInfoResponse
316316drepInfo (unHexText -> dRepId) = do
317317 CacheEnv {dRepInfoCache} <- asks vvaCache
You can’t perform that action at this time.
0 commit comments