Skip to content

Commit 8bc17f8

Browse files
authored
Merge pull request #605 from wheval/fix/issues-547
2 parents 262ba53 + e37837f commit 8bc17f8

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

backend/src/services/claimable.service.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export interface ClaimableAmountResult {
2323
actionable: boolean;
2424
calculatedAt: number;
2525
cached: boolean;
26+
cachedAt?: string;
2627
}
2728

2829
interface ClaimableServiceOptions {
@@ -92,10 +93,6 @@ export class ClaimableAmountService {
9293
this.nowMs = options.nowMs ?? (() => Date.now());
9394
}
9495

95-
clearCache(): void {
96-
// Internal cache is handled by redis/MemoryCache cleanup
97-
}
98-
9996
getClaimableAmount(
10097
stream: ClaimableStreamState,
10198
requestedAt?: number,
@@ -113,8 +110,8 @@ export class ClaimableAmountService {
113110
return {
114111
...cachedEntry,
115112
cached: true,
116-
cachedAt: metadata?.createdAt
117-
} as any;
113+
...(metadata?.createdAt !== undefined && { cachedAt: metadata.createdAt }),
114+
};
118115
}
119116

120117
const anchorTime = BigInt(Math.max(0, stream.lastUpdateTime));

0 commit comments

Comments
 (0)