Skip to content

Commit

Permalink
fix(case-details-card): wait for dispute to load fully
Browse files Browse the repository at this point in the history
Fixed COURT-4
  • Loading branch information
epiqueras committed Mar 12, 2019
1 parent e8a80af commit 7cdac70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/case-details-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ const CaseDetailsCard = ({ ID }) => {
const votesData = useCacheCall(['KlerosLiquid'], call => {
let votesData = { loading: true }
const currentRuling = call('KlerosLiquid', 'currentRuling', ID)
if (draws) {
if (dispute2 && draws) {
const drawnInCurrentRound =
draws.length > 0 &&
Number(draws[draws.length - 1].returnValues._appeal) ===
Expand All @@ -198,7 +198,7 @@ const CaseDetailsCard = ({ ID }) => {
draws[draws.length - 1].returnValues._appeal,
draws[draws.length - 1].returnValues._voteID
)
if (dispute && dispute2 && (!drawnInCurrentRound || vote))
if (dispute && (!drawnInCurrentRound || vote))
votesData = draws.reduce(
(acc, d) => {
if (
Expand Down

0 comments on commit 7cdac70

Please sign in to comment.