Skip to content

Commit

Permalink
fix: show failure status when executor result is failure
Browse files Browse the repository at this point in the history
  • Loading branch information
chalabi2 committed Dec 24, 2024
1 parent 91a57c6 commit a8c8a2a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions components/groups/components/groupControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,11 @@ export default function GroupControls({
}

const proposalTally = tallies.find(t => t.proposalId === proposal.id)?.tally;

console.log(proposal.executor_result.toString());
let status = 'Pending';
if (proposal.status.toString() === 'PROPOSAL_STATUS_ACCEPTED') {
if (proposal.executor_result.toString() === 'PROPOSAL_EXECUTOR_RESULT_FAILURE') {
status = 'Failure';
} else if (proposal.status.toString() === 'PROPOSAL_STATUS_ACCEPTED') {
status = 'Execute';
} else if (proposal.status.toString() === 'PROPOSAL_STATUS_CLOSED') {
status = 'Executed';
Expand Down

0 comments on commit a8c8a2a

Please sign in to comment.