Skip to content

Commit

Permalink
Fix insertDonationsFromQfRoundHistory when can not find corosponding …
Browse files Browse the repository at this point in the history
…address
  • Loading branch information
mohammadranjbarz committed Dec 10, 2023
1 parent 58c4366 commit eee178b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions migration/1701689359018-add_fields_to_qf_round_history.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class addFieldsToQfRoundHistory1701689359018
"matchingFundPriceUsd" = 1,
"matchingFundCurrency" = 'WXDAI'
WHERE
id = 2 AND "matchingFund" IS NOT NULL;
"qfRoundId" = 2 AND "matchingFund" IS NOT NULL;
`);

Expand All @@ -44,7 +44,7 @@ export class addFieldsToQfRoundHistory1701689359018
"matchingFundPriceUsd" = 1,
"matchingFundCurrency" = 'DAI'
WHERE
id = 4 AND "matchingFund" IS NOT NULL;
"qfRoundId" = 4 AND "matchingFund" IS NOT NULL;
`);
}
Expand Down
6 changes: 3 additions & 3 deletions src/services/donationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -523,9 +523,9 @@ export const insertDonationsFromQfRoundHistory = async (): Promise<void> => {
NOW()
FROM
"qf_round_history" q
LEFT JOIN "project" p ON q."projectId" = p."id"
LEFT JOIN "user" u ON u."id" = ${user.id}
LEFT JOIN "project_address" pa ON pa."projectId" = p."id" AND pa."networkId" = CAST(q."distributedFundNetwork" AS INTEGER)
INNER JOIN "project" p ON q."projectId" = p."id"
INNER JOIN "user" u ON u."id" = ${user.id}
INNER JOIN "project_address" pa ON pa."projectId" = p."id" AND pa."networkId" = CAST(q."distributedFundNetwork" AS INTEGER)
WHERE
q."distributedFundTxHash" IS NOT NULL AND
q."matchingFundAmount" IS NOT NULL AND
Expand Down

0 comments on commit eee178b

Please sign in to comment.