From cd451c09ae0961d8d09e4ab794058408e0ad08d8 Mon Sep 17 00:00:00 2001 From: Joseph Chalabi Date: Tue, 7 Jan 2025 20:27:31 -0700 Subject: [PATCH] fix: failed exec shows execute button --- components/groups/modals/voteDetailsModal.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/components/groups/modals/voteDetailsModal.tsx b/components/groups/modals/voteDetailsModal.tsx index b9be076..cfa7caf 100644 --- a/components/groups/modals/voteDetailsModal.tsx +++ b/components/groups/modals/voteDetailsModal.tsx @@ -435,13 +435,16 @@ function VoteDetailsModal({ const isClosed = proposal?.status === ('PROPOSAL_STATUS_CLOSED' as unknown as ProposalStatus); const isProposer = proposal?.proposers?.includes(address ?? ''); - if (isAccepted && isNotRun) { + if ((isAccepted && isNotRun) || isFailure) { return { action: 'execute', label: 'Execute' }; } else if (isNotRun && proposalClosed && !isRejected) { return { action: 'execute', label: 'Execute' }; } else if (!isClosed && !proposalClosed && !userHasVoted) { return { action: 'vote', label: 'Vote' }; - } else if (isRejected || isFailure || userHasVoted || (isProposer && !isNotRun)) { + } else if ( + (!isAccepted && isProposer) || + ((isRejected || userHasVoted) && !isAccepted && !isNotRun) + ) { return { action: 'remove', label: 'Remove' }; } return { action: null, label: null };