Skip to content

Commit

Permalink
simplify useQuery action key
Browse files Browse the repository at this point in the history
  • Loading branch information
brendan-defi committed Jan 10, 2025
1 parent 10e8c69 commit 0b4c243
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/core-react/wallet/hooks/usePortfolioTokenBalances.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ export function usePortfolioTokenBalances({
}: {
address: Address | undefined | null;
}): UseQueryResult<PortfolioTokenBalances> {
const actionKey = `usePortfolioTokenBalances-${address}`;
return useQuery({
queryKey: ['usePortfolioTokenBalances', actionKey],
queryKey: ['usePortfolioTokenBalances', address],
queryFn: async () => {
const response = await getPortfolioTokenBalances({
addresses: [address as Address], // Safe to coerce to Address because useQuery's enabled flag will prevent the query from running if address is undefined
Expand Down

0 comments on commit 0b4c243

Please sign in to comment.