1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-27 02:38:18 +00:00
This commit is contained in:
Vladimir Volek 2019-04-24 14:46:16 +02:00
parent a600266786
commit 88394eede2
3 changed files with 4 additions and 12 deletions

View File

@ -379,8 +379,6 @@ export const handleCoinVisibility = (
newConfig = [...configuration, coinShortcut];
}
console.log(coinShortcut, shouldBeVisible, isExternal);
if (isExternal) {
storageUtils.set(TYPE, KEY_HIDDEN_COINS_EXTERNAL, JSON.stringify(newConfig));
dispatch({
@ -402,9 +400,6 @@ export const toggleGroupCoinsVisibility = (
isExternal: boolean
): ThunkAction => (dispatch: Dispatch) => {
// supported coins
console.log('checked', checked);
if (checked && !isExternal) {
dispatch({
type: WALLET.SET_HIDDEN_COINS,

View File

@ -56,11 +56,11 @@ class CoinMenu extends PureComponent<Props> {
}
getOtherCoins() {
const { hiddenCoins } = this.props.wallet;
const { hiddenCoinsExternal } = this.props.wallet;
return coins
.sort((a, b) => a.order - b.order)
.filter(item => !item.isHidden) // hide coins globally in config
.filter(item => !hiddenCoins.includes(item.id))
.filter(item => !hiddenCoinsExternal.includes(item.id))
.map(coin => {
const row = (
<RowCoin
@ -102,10 +102,10 @@ class CoinMenu extends PureComponent<Props> {
}
isBottomMenuEmpty() {
const { hiddenCoins } = this.props.wallet;
const { hiddenCoinsExternal } = this.props.wallet;
const numberOfVisibleNetworks = coins
.filter(item => !item.isHidden)
.filter(item => !hiddenCoins.includes(item.id));
.filter(item => !hiddenCoinsExternal.includes(item.id));
return numberOfVisibleNetworks.length <= 0;
}

View File

@ -111,9 +111,6 @@ class CoinsSettings extends PureComponent<Props, State> {
<Wrapper>
<Row>
<Content>
{console.log('hidden coins', props.hiddenCoins)}
{console.log('hidden coins', props.hiddenCoins)}
{console.log('hidden coins external', props.hiddenCoinsExternal)}
<Label>
<Left>
<FormattedMessage {...l10nMessages.TR_VISIBLE_COINS} />