Skip to content

Commit

Permalink
Merge pull request #247 from sotatek-dev/feat/add-token
Browse files Browse the repository at this point in the history
fix: api daily quota
  • Loading branch information
Sotatek-TanHoang authored Jan 8, 2025
2 parents 703fa96 + d0f8958 commit 5b6ceeb
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/modules/users/users.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,16 @@ export class UsersService {

async getDailyQuotaOfUser(senderAddress: string, tokenReceivedAddress: string) {
const [dailyQuota, totalamount] = await Promise.all([
this.commonConfigRepository.getCommonConfig(),
this.commonConfigRepository.findOne({
where: {
fromAddress: tokenReceivedAddress,
},
select: {
fromAddress: true,
id: true,
dailyQuota: true,
},
}),
this.eventLogRepository.sumAmountBridgeOfUserInDay(senderAddress, tokenReceivedAddress),
]);

Expand Down

0 comments on commit 5b6ceeb

Please sign in to comment.