Skip to content

Commit

Permalink
fix fallback!
Browse files Browse the repository at this point in the history
  • Loading branch information
wtfsayo committed Dec 9, 2024
1 parent 2078844 commit 2674637
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,5 @@ export const MilestoneDetails: React.FC<MilestoneDetailsProps> = ({
}
)

if (!decodedTxnData?._escrowData?.value) {
return (
<Text variant="code" color="negative">
Error Decoding Escrow Milestones
</Text>
)
}

return <Accordion items={milestonesDetails || []} />
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box, Flex, Paragraph, atoms } from '@zoralabs/zord'
import { Box, Flex, Paragraph, Text, atoms } from '@zoralabs/zord'
import { useEffect } from 'hono/jsx'
import { toLower } from 'lodash'
import Image from 'next/image'
Expand Down Expand Up @@ -53,6 +53,7 @@ export const ProposalDescription: React.FC<ProposalDescriptionProps> = ({
}) => {
const { description, proposer, calldatas, values, targets, executionTransactionHash } =
proposal

const { displayName } = useEnsData(proposer)
const chain = useChainStore((x) => x.chain)

Expand Down Expand Up @@ -96,12 +97,19 @@ export const ProposalDescription: React.FC<ProposalDescriptionProps> = ({
)}
</Paragraph>
</Section>

{isEscrow && decodedTxnData && (
<Section title="Escrow Milestones">
<MilestoneDetails
decodedTxnData={decodedTxnData}
executionTransactionHash={executionTransactionHash}
/>
{executionTransactionHash ? (
<MilestoneDetails
decodedTxnData={decodedTxnData}
executionTransactionHash={executionTransactionHash}
/>
) : !decodedTxnData?._escrowData?.value ? (
<Text variant="code" color="negative">
Error Decoding Escrow Milestones
</Text>
) : null}
</Section>
)}

Expand Down

0 comments on commit 2674637

Please sign in to comment.