Skip to content

Commit

Permalink
Merge branch 'staging'
Browse files Browse the repository at this point in the history
  • Loading branch information
xavier506 committed Oct 19, 2021
2 parents 2407573 + c90b615 commit e76886b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion webapp/src/components/CompareTool/CompareGraphView.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const CompareGraphView = ({
<Box className={classes.wrapperDesktop}>
<Box className={classes.bodyModalView}>
<Box className={classes.chartWrapper}>
<PolarChart data={selected.map(bp => bp?.data)} />
<PolarChart data={selected.map(bp => bp?.data).filter(bp => bp)} />
</Box>
{isProxy && selected.length > 0 && (
<Box className={classes.proxyVote}>
Expand Down
8 changes: 5 additions & 3 deletions webapp/src/components/CompareTool/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ const CompareTool = ({
const { t } = useTranslation('translations')
const classes = useStyles()
const [isCollapsedView, setIsCollapsedView] = useState(true)
const selectedData = selected.map(name =>
list.find(({ owner }) => name === owner)
)
const selectedData = selected.map(name => {
const tempBp = list.find(({ owner }) => name === owner)

return tempBp || { owner: name }
})
const { proxy, producers } = _get(userInfo, 'voter_info', {
proxy: '',
producers: []
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/context/models/producers.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export const getTotalStats = ({
return {
average,
ratings_cntr:
producerData?.ratings_cntr || 0 + edenStats?.ratings_cntr || 0,
(producerData?.ratings_cntr || 0) + (edenStats?.ratings_cntr || 0),
community,
development,
infrastructure,
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/routes/BlockProducers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ const AllBps = () => {
}

useEffect(() => {
if (!state.user) return
if (!state.user || state?.selectedProducers?.length > 0) return

setSelectedProducers([
...state.selectedProducers,
Expand Down

0 comments on commit e76886b

Please sign in to comment.