Skip to content

Commit

Permalink
ZEUS-2523: Bug fix: Coins: external wallets marked hidden appear in t…
Browse files Browse the repository at this point in the history
…ab nav
  • Loading branch information
kaloudis committed Nov 10, 2024
1 parent 3147881 commit c95a962
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 c95a962

Please sign in to comment.