Skip to content

Commit 2e5a30d

Browse files
VGR-GITclaude
andcommitted
fix(rewards): accept readonly arrays in useInvalidateByRewardEvents
TypeScript infers tuple literals as readonly arrays, so callers passing ['RewardsController:accountLinked', ...] were failing strict type checks. Widening the parameter to readonly RewardEvent[] fixes all affected hooks. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 43287d5 commit 2e5a30d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/components/UI/Rewards/hooks/useInvalidateByRewardEvents.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ type RewardEvent = `RewardsController:${string}`;
1212
* @param callback - The function to execute when any of the specified events are triggered.
1313
*/
1414
export const useInvalidateByRewardEvents = (
15-
events: RewardEvent[],
15+
events: readonly RewardEvent[],
1616
callback: () => void,
1717
): void => {
1818
// Subscribe to events and clean up on unmount or when events change

0 commit comments

Comments
 (0)