1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-13 20:08:56 +00:00

Minor code cleanup changes

This commit is contained in:
Vasek Mlejnsky 2018-09-24 10:07:44 +02:00
parent 957e02f313
commit f8bcb0a357
3 changed files with 3 additions and 9 deletions

View File

@ -86,7 +86,7 @@ export const validation = (): PayloadAction<State> => (dispatch: Dispatch, getSt
state.errors = {};
state.warnings = {};
state.infos = {};
state = dispatch(recalculate(state));
state = dispatch(recalculateTotalAmount(state));
state = dispatch(updateCustomFeeLabel(state));
state = dispatch(addressValidation(state));
state = dispatch(addressLabel(state));
@ -98,7 +98,7 @@ export const validation = (): PayloadAction<State> => (dispatch: Dispatch, getSt
return state;
};
export const recalculate = ($state: State): PayloadAction<State> => (dispatch: Dispatch, getState: GetState): State => {
export const recalculateTotalAmount = ($state: State): PayloadAction<State> => (dispatch: Dispatch, getState: GetState): State => {
const {
account,
tokens,

View File

@ -13,11 +13,9 @@ import ICONS from 'config/icons';
import type { Props } from '../../Container';
// duplicates from ../../Container
const InputRow = styled.div`
margin-bottom: 20px;
`;
// duplicates end
const InputLabelWrapper = styled.div`
display: flex;

View File

@ -233,10 +233,6 @@ const AccountSend = (props: Props) => {
const tokensSelectData = getTokensSelectData(tokens, network);
const isAdvancedSettingsHidden = !advanced;
// eslint workaround (is this some bug?)
// if i put {true} directly to "AdvancedSettingsIcon" component
// i get eslint error
const advancedButtonCanAnimate = true;
return (
<SelectedAccount {...props}>
@ -348,7 +344,7 @@ const AccountSend = (props: Props) => {
color={colors.TEXT_SECONDARY}
size={24}
isActive={advanced}
canAnimate={advancedButtonCanAnimate}
canAnimate
/>
</ToggleAdvancedSettingsButton>