Skip to content

Commit

Permalink
Fix: ui/components/app/assets/asset-list/asset-list-control-bar/asset…
Browse files Browse the repository at this point in the history
…-list-control-bar.tsx
  • Loading branch information
gambinish committed Sep 18, 2024
1 parent 93828aa commit e680f43
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const AssetListControlBar = ({
isNative: true,
};

useEffect(() => {
const handleSort = () => {
if (!sorted) {
const tokensWithBalances =
accountTotalFiatBalance.tokensWithBalances as TokenWithBalance[];
Expand Down Expand Up @@ -110,7 +110,15 @@ const AssetListControlBar = ({
setTokenList([nativeTokenWithBalance, ...tokensWithBalances]);
}
}
}, [tokenSortConfig, loading]);
};

useEffect(() => {
handleSort();
}, [
tokenSortConfig,
loading,
accountTotalFiatBalance.tokensWithBalances.length,
]);

const handleOpenPopover = () => {
setIsPopoverOpen(!isPopoverOpen);
Expand Down

0 comments on commit e680f43

Please sign in to comment.