pull/454/head
slowbackspace 5 years ago
parent 7c37d6745b
commit 7f2ce33d33

@ -286,7 +286,7 @@ const loadStorageData = (): ThunkAction => (dispatch: Dispatch): void => {
const hideBalance: ?boolean = storageUtils.get(TYPE, KEY_HIDE_BALANCE);
if (hideBalance) {
dispatch(WalletActions.setHideBalance(JSON.parse(hideBalance)));
dispatch(WalletActions.setHideBalance(hideBalance));
}
};

@ -65,6 +65,7 @@ export type WalletAction =
}
| {
type: typeof WALLET.SET_HIDE_BALANCE,
toggled: boolean,
};
export const init = (): ThunkAction => (dispatch: Dispatch): void => {

@ -3,7 +3,7 @@ import * as TrezorConnectActions from 'actions/TrezorConnectActions';
import * as DiscoveryActions from 'actions/DiscoveryActions';
import * as RouterActions from 'actions/RouterActions';
import * as ModalActions from 'actions/ModalActions';
import { toggleDeviceDropdown } from 'actions/WalletActions';
import * as WalletActions from 'actions/WalletActions';
import type { State } from 'flowtype';
export type StateProps = {
@ -19,7 +19,9 @@ export type StateProps = {
};
export type DispatchProps = {
toggleDeviceDropdown: typeof toggleDeviceDropdown,
toggleDeviceDropdown: typeof WalletActions.toggleDeviceDropdown,
toggleSidebar: typeof WalletActions.toggleSidebar,
setHideBalance: typeof WalletActions.setHideBalance,
addAccount: typeof DiscoveryActions.addAccount,
acquireDevice: typeof TrezorConnectActions.acquire,
forgetDevice: typeof TrezorConnectActions.forget,

@ -111,7 +111,7 @@ class AccountBalance extends PureComponent<Props, State> {
};
}
componentDidUpdate(prevProps) {
componentDidUpdate(prevProps: Props) {
if (prevProps.isHidden !== this.props.isHidden) {
this.setState({
isHidden: this.props.isHidden,

@ -109,7 +109,7 @@ class AccountBalance extends PureComponent<Props, State> {
};
}
componentDidUpdate(prevProps) {
componentDidUpdate(prevProps: Props) {
console.log(this.props.isHidden);
if (prevProps.isHidden !== this.props.isHidden) {
this.setState({

@ -4,8 +4,16 @@ import React from 'react';
import { FormattedMessage } from 'react-intl';
import Content from 'views/Wallet/components/Content';
import { Switch, Select, Link, Button, Tooltip, Icon, icons as ICONS } from 'trezor-ui-components';
import colors from 'config/colors';
import {
Switch,
Select,
Link,
Button,
Tooltip,
Icon,
icons as ICONS,
colors,
} from 'trezor-ui-components';
import { FIAT_CURRENCIES } from 'config/app';
import { FONT_SIZE } from 'config/variables';
import l10nCommonMessages from 'views/common.messages';

Loading…
Cancel
Save