fix(wallet): getPendingRewards 只返回 PENDING 状态记录

之前 getPendingRewards 没有传 status 过滤参数,返回了所有状态
(包括 SETTLED 和 EXPIRED)的记录,导致前端误将已结算的预种条目
显示在待领取列表中。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-03-01 09:07:31 -08:00
parent 718e70e61a
commit d849ca7bc2
1 changed files with 5 additions and 1 deletions

View File

@ -2292,7 +2292,11 @@ export class WalletApplicationService {
status: string; status: string;
createdAt: string; createdAt: string;
}>> { }>> {
const rewards = await this.pendingRewardRepo.findByAccountSequence(accountSequence); // [2026-03-01] 修复:只返回 PENDING 状态的记录,排除已结算和已过期的
const rewards = await this.pendingRewardRepo.findByAccountSequence(
accountSequence,
PendingRewardStatus.PENDING,
);
return rewards.map(r => ({ return rewards.map(r => ({
id: r.id.toString(), id: r.id.toString(),
usdtAmount: r.usdtAmount.value, usdtAmount: r.usdtAmount.value,