Skip to content

Commit

Permalink
fix: update height calculation in RenderWalletList component to inclu…
Browse files Browse the repository at this point in the history
…de displayWallets length
  • Loading branch information
ericHgorski committed Dec 23, 2024
1 parent 068457e commit 407be91
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/widget/src/components/RenderWalletList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export const RenderWalletList = ({

const height = useMemo(() => {
return Math.min(530, displayWallets.length * (ITEM_HEIGHT + ITEM_GAP));
}, [walletList]);
}, [walletList, displayWallets.length]);

Check warning on line 170 in packages/widget/src/components/RenderWalletList.tsx

View workflow job for this annotation

GitHub Actions / eslint

React Hook useMemo has an unnecessary dependency: 'walletList'. Either exclude it or remove the dependency array


const renderWalletListOrWalletConnectionStatus = useMemo(() => {
Expand Down Expand Up @@ -227,11 +227,9 @@ export const RenderWalletList = ({
connectMutation.variables?.walletInfo.logo,
connectMutation.variables?.walletPrettyName,
height,
displayWallets,
renderItem,
theme.primary.text.lowContrast,
theme.primary.text.normal,
walletList,
]);

return (
Expand Down

0 comments on commit 407be91

Please sign in to comment.