Skip to content

Commit

Permalink
fix: filter hidden accounts, ref #LEA-1823
Browse files Browse the repository at this point in the history
  • Loading branch information
pete-watters committed Dec 6, 2024
1 parent 33c61cc commit 082a197
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
30 changes: 16 additions & 14 deletions apps/mobile/src/components/widgets/accounts/accounts-widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,22 @@ export function AccountsWidget() {
paddingHorizontal: theme.spacing['5'],
}}
>
{accounts.list.map(account => (
<AccountCard
account={account}
key={account.id}
onPress={() => {
router.navigate({
pathname: AppRoutes.Account,
params: {
accountId: account.id,
},
});
}}
/>
))}
{accounts.list
.filter(account => account.status !== 'hidden')
.map(account => (
<AccountCard
account={account}
key={account.id}
onPress={() => {
router.navigate({
pathname: AppRoutes.Account,
params: {
accountId: account.id,
},
});
}}
/>
))}

{accounts.hasAccounts ? (
<AddAccountCard onPress={() => addAccountSheetRef.current?.present()} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function AccountSelectorSheet({ sheetRef }: { sheetRef: RefObject<SheetRe

return (
<AccountSelectorSheetLayout
accounts={accounts}
accounts={accounts.filter(account => account.status !== 'hidden')}
onAccountPress={onAccountPress}
swapAccountIndexes={swapAccountIndexes}
sheetRef={sheetRef}
Expand Down

0 comments on commit 082a197

Please sign in to comment.