1
0
mirror of https://github.com/trezor/trezor-wallet synced 2025-01-12 17:10:56 +00:00

filter coins in menu

This commit is contained in:
Vladimir Volek 2019-04-16 19:10:19 +02:00
parent 7050cf006d
commit a0c4a6e477

View File

@ -76,11 +76,13 @@ class CoinMenu extends PureComponent<Props> {
}
render() {
const { hiddenCoins } = this.props.wallet;
const { config } = this.props.localStorage;
return (
<Wrapper data-test="Main__page__coin__menu">
{config.networks
.filter(item => !item.isHidden)
.filter(item => !item.isHidden) // filter coins globally in config
.filter(item => hiddenCoins.includes(item.shortcut)) // filter coins by user settings
.sort((a, b) => a.order - b.order)
.map(item => (
<NavLink