Skip to content

Commit

Permalink
save a copy of pending rewards when we publish them (#4925)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcasey authored Oct 30, 2024
1 parent fa5b5b9 commit 3c99ced
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/proposals/createRewardsForProposal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ export async function createRewardsForProposal({ proposalId, userId }: { userId:

const createdPageIds = (await Promise.all(rewardsPromises)).filter(isTruthy);

const updatedFields = { ...fields, pendingRewards: rewardsToCreate };
// keep a copy of the pending rewards that were published
const updatedFields = { ...fields, pendingRewards: rewardsToCreate, pendingRewardsPublished: pendingRewards };

const updatedProposal = await prisma.proposal.update({
where: {
Expand Down

0 comments on commit 3c99ced

Please sign in to comment.