Skip to content

Commit

Permalink
feat: check unclaimed
Browse files Browse the repository at this point in the history
  • Loading branch information
KieSun committed May 20, 2024
1 parent 4918ac2 commit 7af5b44
Showing 1 changed file with 16 additions and 19 deletions.
35 changes: 16 additions & 19 deletions src/core/service/contribution.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,24 +366,21 @@ export class ContributionService {
},
},
});
return data;
// const unClaimed = [];
// for (let i = 0; i < data.length; i++) {
// const item = data[i];
// if (item.status !== Status.CLAIM) {
// unClaimed.push(item);
// await this.updateContributionState(
// item.id,
// {
// type: 'claim',
// uId: item.uId,
// },
// true,
// );
// } else {
// return;
// }
// }
// return unClaimed;
const unClaimed = [];
for (let i = 0; i < data.length; i++) {
const item = data[i];
if (item.status !== Status.CLAIM) {
unClaimed.push(item);
await this.updateContributionState(
item.id,
{
type: 'claim',
uId: item.uId,
},
true,
);
}
}
return unClaimed;
}
}

0 comments on commit 7af5b44

Please sign in to comment.