Skip to content

Commit

Permalink
fix: reclaim, badge
Browse files Browse the repository at this point in the history
  • Loading branch information
CzarekDryl committed Dec 20, 2024
1 parent 0b9ce27 commit 8747f5f
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docker/colony-cdapp-dev-env-block-ingestor
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM colony-cdapp-dev-env/base:latest

ENV BLOCK_INGESTOR_HASH=8b3c23b0154ef1487c3b13df5b2f2d0d5a093f39
ENV BLOCK_INGESTOR_HASH=017cb82f9b80c1058dbf077c9a7712828b09c0de

# Declare volumes to set up metadata
VOLUME [ "/colonyCDapp/amplify/mock-data" ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ const FinalizeStep: FC<FinalizeStepProps> = ({

if (
type === ColonyActionType.CancelExpenditureMotion &&
!actionData.motionData.willPunishExpenditureStaker &&
expenditure?.isStaked
) {
const payload: ReclaimExpenditureStakePayload = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { type ActionWithPermissionsInfoProps } from './types.ts';
const ActionWithPermissionsInfo: FC<ActionWithPermissionsInfoProps> = ({
action,
title,
additionalBadge,
}) => {
if (!action) {
return null;
Expand Down Expand Up @@ -42,11 +43,14 @@ const ActionWithPermissionsInfo: FC<ActionWithPermissionsInfoProps> = ({
key: '1',
content: (
<>
<h4 className="text-1">
{formatText({
id: 'action.executed.permissions.overview',
})}
</h4>
<div className="flex items-center justify-between">
<h4 className="text-1">
{formatText({
id: 'action.executed.permissions.overview',
})}
</h4>
{additionalBadge}
</div>
{initiatorAddress && (
<>
<div className="mt-2 flex items-center gap-2">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ import { type ExpenditureAction } from '~types/graphql.ts';
export interface ActionWithPermissionsInfoProps {
action?: ExpenditureAction | null;
title?: string;
additionalBadge?: React.ReactNode;
}
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,14 @@ const PaymentBuilderWidget: FC<PaymentBuilderWidgetProps> = ({ action }) => {
<ActionWithPermissionsInfo
action={sortedCancellingActions?.[0]}
title={formatText({ id: 'expenditure.cancelStage.info' })}
additionalBadge={
expenditure?.status === ExpenditureStatus.Cancelled && (
<PenaliseBadge
text={formatText({ id: 'expenditure.penalised' })}
isPenalised
/>
)
}
/>
),
isHidden: allCancelMotions.length === 0 && !isExpenditureCanceled,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ export const useGetFinalizeStep = ({
id: 'expenditure.releaseStage.info',
})}
content={
expectedStepKey === ExpenditureStep.Payment ? (
expectedStepKey === ExpenditureStep.Payment ||
expectedStepKey === ExpenditureStep.Cancel ? (
<IconButton
className="max-h-[2.5rem] w-full !text-md"
rounded="s"
Expand Down

0 comments on commit 8747f5f

Please sign in to comment.