mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-24 09:18:09 +00:00
Minor code cleanup changes
This commit is contained in:
parent
957e02f313
commit
f8bcb0a357
@ -86,7 +86,7 @@ export const validation = (): PayloadAction<State> => (dispatch: Dispatch, getSt
|
|||||||
state.errors = {};
|
state.errors = {};
|
||||||
state.warnings = {};
|
state.warnings = {};
|
||||||
state.infos = {};
|
state.infos = {};
|
||||||
state = dispatch(recalculate(state));
|
state = dispatch(recalculateTotalAmount(state));
|
||||||
state = dispatch(updateCustomFeeLabel(state));
|
state = dispatch(updateCustomFeeLabel(state));
|
||||||
state = dispatch(addressValidation(state));
|
state = dispatch(addressValidation(state));
|
||||||
state = dispatch(addressLabel(state));
|
state = dispatch(addressLabel(state));
|
||||||
@ -98,7 +98,7 @@ export const validation = (): PayloadAction<State> => (dispatch: Dispatch, getSt
|
|||||||
return state;
|
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 {
|
const {
|
||||||
account,
|
account,
|
||||||
tokens,
|
tokens,
|
||||||
|
@ -13,11 +13,9 @@ import ICONS from 'config/icons';
|
|||||||
|
|
||||||
import type { Props } from '../../Container';
|
import type { Props } from '../../Container';
|
||||||
|
|
||||||
// duplicates from ../../Container
|
|
||||||
const InputRow = styled.div`
|
const InputRow = styled.div`
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
`;
|
`;
|
||||||
// duplicates end
|
|
||||||
|
|
||||||
const InputLabelWrapper = styled.div`
|
const InputLabelWrapper = styled.div`
|
||||||
display: flex;
|
display: flex;
|
@ -233,10 +233,6 @@ const AccountSend = (props: Props) => {
|
|||||||
|
|
||||||
const tokensSelectData = getTokensSelectData(tokens, network);
|
const tokensSelectData = getTokensSelectData(tokens, network);
|
||||||
const isAdvancedSettingsHidden = !advanced;
|
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 (
|
return (
|
||||||
<SelectedAccount {...props}>
|
<SelectedAccount {...props}>
|
||||||
@ -348,7 +344,7 @@ const AccountSend = (props: Props) => {
|
|||||||
color={colors.TEXT_SECONDARY}
|
color={colors.TEXT_SECONDARY}
|
||||||
size={24}
|
size={24}
|
||||||
isActive={advanced}
|
isActive={advanced}
|
||||||
canAnimate={advancedButtonCanAnimate}
|
canAnimate
|
||||||
/>
|
/>
|
||||||
</ToggleAdvancedSettingsButton>
|
</ToggleAdvancedSettingsButton>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user