Skip to content

Commit

Permalink
feat: Show Proposal chip for unsigned transactions in the queue (#4422)
Browse files Browse the repository at this point in the history
  • Loading branch information
usame-algan authored Oct 25, 2024
1 parent 2e12779 commit e61ee66
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/components/transactions/TxSummary/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import TxProposalChip from '@/features/proposers/components/TxProposalChip'
import StatusLabel from '@/features/swap/components/StatusLabel'
import useIsExpiredSwap from '@/features/swap/hooks/useIsExpiredSwap'
import { Box } from '@mui/material'
Expand Down Expand Up @@ -74,10 +75,14 @@ const TxSummary = ({ item, isConflictGroup, isBulkGroup }: TxSummaryProps): Reac

{isQueue && executionInfo && (
<Box gridArea="confirmations">
<TxConfirmations
submittedConfirmations={executionInfo.confirmationsSubmitted}
requiredConfirmations={executionInfo.confirmationsRequired}
/>
{executionInfo.confirmationsSubmitted > 0 ? (
<TxConfirmations
submittedConfirmations={executionInfo.confirmationsSubmitted}
requiredConfirmations={executionInfo.confirmationsRequired}
/>
) : (
<TxProposalChip />
)}
</Box>
)}

Expand Down
32 changes: 32 additions & 0 deletions src/features/proposers/components/TxProposalChip.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { Chip, SvgIcon, Tooltip, Typography } from '@mui/material'
import InfoIcon from '@/public/images/notifications/info.svg'

const TxProposalChip = () => {
return (
<Tooltip title="This transaction was created by a Proposer. Reject or confirm it to proceed.">
<span>
<Chip
sx={{ backgroundColor: 'background.main', color: 'primary.light' }}
size="small"
label={
<Typography
variant="caption"
fontWeight="bold"
display="flex"
alignItems="center"
justifyContent="center"
gap={0.7}
>
<SvgIcon component={InfoIcon} inheritViewBox fontSize="small" />
<Typography variant="caption" fontWeight="bold">
Proposal
</Typography>
</Typography>
}
/>
</span>
</Tooltip>
)
}

export default TxProposalChip

0 comments on commit e61ee66

Please sign in to comment.