From c534b4aac5ad2873da79c275b3b46d01a77015eb Mon Sep 17 00:00:00 2001 From: Kane Thomas Date: Fri, 20 Dec 2024 15:37:54 -0500 Subject: [PATCH] prevent auto pin from running multiple times, remove total balance text --- src/screens/change-wallet/ChangeWalletSheet.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/screens/change-wallet/ChangeWalletSheet.tsx b/src/screens/change-wallet/ChangeWalletSheet.tsx index 0672a1c4703..5d4f0aa0da4 100644 --- a/src/screens/change-wallet/ChangeWalletSheet.tsx +++ b/src/screens/change-wallet/ChangeWalletSheet.tsx @@ -91,9 +91,9 @@ export default function ChangeWalletSheet() { const walletsWithBalancesAndNames = useWalletsWithBalancesAndNames(); const initialHasShownEditHintTooltip = useMemo(() => usePinnedWalletsStore.getState().hasShownEditHintTooltip, []); - const initialHasAutoPinnedAddresses = useMemo(() => usePinnedWalletsStore.getState().hasAutoPinnedAddresses, []); const initialPinnedAddressCount = useMemo(() => usePinnedWalletsStore.getState().pinnedAddresses.length, []); const { transactionCounts, isLoading: isLoadingTransactionCounts } = useWalletTransactionCounts(wallets || {}); + const hasAutoPinnedAddresses = usePinnedWalletsStore(state => state.hasAutoPinnedAddresses); const featureHintTooltipRef = useRef(null); @@ -164,7 +164,7 @@ export default function ChangeWalletSheet() { // If user has never seen pinned addresses feature, auto-pin the users most used owned addresses useEffect(() => { - if (initialHasAutoPinnedAddresses || initialPinnedAddressCount > 0 || isLoadingTransactionCounts) return; + if (hasAutoPinnedAddresses || initialPinnedAddressCount > 0 || isLoadingTransactionCounts) return; const pinnableAddresses = allWalletItems.filter(item => !item.isReadOnly).map(item => item.address); @@ -179,7 +179,7 @@ export default function ChangeWalletSheet() { }, [ allWalletItems, setPinnedAddresses, - initialHasAutoPinnedAddresses, + hasAutoPinnedAddresses, initialPinnedAddressCount, transactionCounts, isLoadingTransactionCounts, @@ -706,7 +706,8 @@ export default function ChangeWalletSheet() { paddingHorizontal={{ custom: PANEL_INSET_HORIZONTAL }} paddingTop="24px" > - {!editMode && ownedWalletsTotalBalance ? ( + {/* TODO: enable when blurview is implemented */} + {/* {!editMode && ownedWalletsTotalBalance ? ( {i18n.t(i18n.l.wallet.change_wallet.total_balance)} @@ -717,7 +718,8 @@ export default function ChangeWalletSheet() { ) : ( - )} + )} */} +