Skip to content

Commit

Permalink
change order of user and project donation totals calculations
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosQ96 committed Nov 10, 2022
1 parent 3dbae24 commit a943e23
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/resolvers/donationResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -658,10 +658,11 @@ export class DonationResolver {

// After updating, recalculate user total donated and owner total received
await updateUserTotalDonated(donorUser.id);
await updateUserTotalReceived(Number(project.admin));

// After updating price we update totalDonations
await updateTotalDonationsOfProject(projectId);
await updateUserTotalReceived(Number(project.admin));

return donation.id;
} catch (e) {
SentryLogger.captureException(e);
Expand Down

0 comments on commit a943e23

Please sign in to comment.