Skip to content

Commit

Permalink
Fixed an issue
Browse files Browse the repository at this point in the history
  • Loading branch information
aminlatifi committed Oct 29, 2024
1 parent 13b62ba commit 65dd43d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
12 changes: 9 additions & 3 deletions src/services/donationService.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,17 @@ function syncDonationStatusWithBlockchainNetworkTestCases() {
it('should associate donation to overlapping qf round after verification', async () => {
sinon.stub(chains, 'validateTransactionWithInputData');
qf = await QfRound.create({
roundNumber: 1,
isActive: true,
name: new Date().toString(),
minimumPassportScore: 8,
slug: new Date().getTime().toString(),
name: new Date().toString() + ' - 1',
allocatedFund: 100,
minimumPassportScore: 12,
slug: new Date().getTime().toString() + ' - 1',
roundUSDCapPerProject: 10_000,
roundUSDCloseCapPerProject: 10_500,
roundUSDCapPerUserPerProject: 2_500,
tokenPrice: 0.5,

beginDate: moment(timestamp).subtract(1, 'second'),
endDate: moment(timestamp).add(2, 'day'),
}).save();
Expand Down
4 changes: 3 additions & 1 deletion src/services/qAccService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ const getQAccDonationCap = async ({
if (isEarlyAccess) {
activeRound = activeEarlyAccessRound;
} else {
activeQfRound = await findActiveQfRound();
activeQfRound = await findActiveQfRound({
date: donateTime,
});
if (
donateTime &&
activeQfRound &&
Expand Down

0 comments on commit 65dd43d

Please sign in to comment.