mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-27 02:38:18 +00:00
cleanup
This commit is contained in:
parent
a600266786
commit
88394eede2
@ -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,
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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} />
|
||||
|
Loading…
Reference in New Issue
Block a user