Skip to content

Commit

Permalink
Delete stream badges and change logic for build submission rejections (
Browse files Browse the repository at this point in the history
  • Loading branch information
Pabl0cks authored Jun 20, 2024
1 parent 7ef451c commit 85a25da
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/nextjs/app/admin/_components/ActionModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const ActionModal = forwardRef<HTMLDialogElement, ActionModalProps>(({ gr
</div>
{action !== PROPOSAL_STATUS.REJECTED && (
<div className="w-full flex-col space-y-1">
<p className="m-0 font-semibold text-base">Transction Hash</p>
<p className="m-0 font-semibold text-base">Transaction Hash</p>
<input
type="text"
ref={transactionInputRef}
Expand Down
6 changes: 0 additions & 6 deletions packages/nextjs/app/admin/_components/GrantReview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,6 @@ export const GrantReview = ({ grant, selected, toggleSelection }: GrantReviewPro
</a>
);
})}
{grant.builderData?.stream?.cap && (
<div className="badge badge-primary">
<span className="font-bold">Stream:&nbsp;</span>
{grant.builderData.stream.cap} ETH
</div>
)}
</div>
</div>
<div className="p-4">
Expand Down
7 changes: 7 additions & 0 deletions packages/nextjs/services/database/grants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,13 @@ export const reviewGrant = async ({ grantId, action, txHash, txChainId, note }:
// Prepare the data to update based on the action
const updateData: Partial<GrantData> = { status: action };

// Reject build submission moving back to APPROVED status
const grantSnapshot = await getGrantSnapshotById(grantId);
const currentStatus = grantSnapshot.data()?.status;
if (currentStatus === PROPOSAL_STATUS.SUBMITTED && action === PROPOSAL_STATUS.REJECTED) {
updateData.status = PROPOSAL_STATUS.APPROVED;
}

if (note !== undefined) {
updateData.note = note;
}
Expand Down

0 comments on commit 85a25da

Please sign in to comment.