Skip to content

Commit eda14ad

Browse files
authored
do it (#2205)
1 parent f890933 commit eda14ad

File tree

1 file changed

+6
-4
lines changed
  • apps/staking/src/app/api/v1/locked_accounts

1 file changed

+6
-4
lines changed

apps/staking/src/app/api/v1/locked_accounts/route.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,12 @@ export async function GET(req: NextRequest) {
7272
actualAmount: tokensToString(custodyAccount.amount),
7373
lock: {
7474
type: lock.type,
75-
schedule: lock.schedule.map((unlock) => ({
76-
date: unlock.date,
77-
amount: tokensToString(unlock.amount),
78-
})),
75+
schedule: lock.schedule
76+
.filter((unlock) => unlock.date > new Date())
77+
.map((unlock) => ({
78+
date: unlock.date,
79+
amount: tokensToString(unlock.amount),
80+
})),
7981
},
8082
};
8183
}),

0 commit comments

Comments
 (0)