Skip to content

Commit

Permalink
Merge pull request #2524 from kaloudis/zeus-2523
Browse files Browse the repository at this point in the history
ZEUS-2523: Bug fix: Coins: external wallets marked hidden appear in tab nav
  • Loading branch information
kaloudis authored Nov 11, 2024
2 parents b8aab13 + c95a962 commit ef19db7
Showing 1 changed file with 26 additions and 21 deletions.
47 changes: 26 additions & 21 deletions components/AccountFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { themeColor } from './../utils/ThemeUtils';

interface PillProps {
name: string;
hidden?: boolean;
textColor?: string;
borderColor?: string;
backgroundColor?: string;
Expand Down Expand Up @@ -72,28 +73,32 @@ function AccountFilter(props: AccountFilterProps) {

for (const item in props.items) {
const account = props.items[item];
const { name } = account;
const { name, hidden } = account;

pills.push(
<View key={name} style={{ padding: 2 }}>
<Pill
title={name}
textColor={themeColor('background')}
borderColor={
selectedPin === name ? themeColor('highlight') : null
}
backgroundColor={
selectedPin === name
? themeColor('highlight')
: themeColor('text')
}
onPress={() => {
if (props.onChangeAccount) props.onChangeAccount();
setPin(name);
}}
/>
</View>
);
if (!hidden) {
pills.push(
<View key={name} style={{ padding: 2 }}>
<Pill
title={name}
textColor={themeColor('background')}
borderColor={
selectedPin === name
? themeColor('highlight')
: null
}
backgroundColor={
selectedPin === name
? themeColor('highlight')
: themeColor('text')
}
onPress={() => {
if (props.onChangeAccount) props.onChangeAccount();
setPin(name);
}}
/>
</View>
);
}
}

return (
Expand Down

0 comments on commit ef19db7

Please sign in to comment.