1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-27 02:38:18 +00:00

Fixed lint

This commit is contained in:
Vladimir Volek 2019-03-06 16:44:47 +01:00
parent 8f642d9b58
commit b4a87a0ce1
4 changed files with 23 additions and 27 deletions

View File

@ -3,9 +3,9 @@
"eslint-config-airbnb",
"prettier",
"prettier/babel",
"plugin:flowtype/recommended",
"prettier/flowtype",
"prettier/react",
"plugin:flowtype/recommended",
"plugin:jest/recommended"
],
"globals": {

View File

@ -16,8 +16,8 @@ import TezosImage from './images/xtz.png';
import type { Props as BaseProps } from '../../Container';
type Props = {
onCancel: $ElementType<$ElementType<BaseProps, 'modalActions'>, 'onCancel'>;
}
onCancel: $ElementType<$ElementType<BaseProps, 'modalActions'>, 'onCancel'>,
};
const Wrapper = styled.div`
width: 100%;
@ -47,11 +47,7 @@ const Img = styled.img`
const TezosWallet = (props: Props) => (
<Wrapper>
<StyledLink onClick={props.onCancel}>
<Icon
size={24}
color={colors.TEXT_SECONDARY}
icon={icons.CLOSE}
/>
<Icon size={24} color={colors.TEXT_SECONDARY} icon={icons.CLOSE} />
</StyledLink>
<Img src={TezosImage} />
<H2>Tezos wallet</H2>
@ -67,4 +63,4 @@ TezosWallet.propTypes = {
onCancel: PropTypes.func.isRequired,
};
export default TezosWallet;
export default TezosWallet;

View File

@ -169,9 +169,9 @@ const getExternalContextModal = (props: Props) => {
case 'xlm':
return <Stellar onCancel={modalActions.onCancel} />;
case 'ada':
return (<Cardano onCancel={modalActions.onCancel} />);
return <Cardano onCancel={modalActions.onCancel} />;
case 'xtz':
return (<Tezos onCancel={modalActions.onCancel} />);
return <Tezos onCancel={modalActions.onCancel} />;
default:
return null;
}

View File

@ -102,17 +102,8 @@ const Left = styled.div`
const AdvancedForm = (props: Props) => {
const { network } = props.selectedAccount;
if (!network) return null;
const {
errors,
warnings,
infos,
fee,
destinationTag,
} = props.sendForm;
const {
onFeeChange,
onDestinationTagChange,
} = props.sendFormActions;
const { errors, warnings, infos, fee, destinationTag } = props.sendForm;
const { onFeeChange, onDestinationTagChange } = props.sendFormActions;
return (
<AdvancedSettingsWrapper>
@ -152,17 +143,24 @@ const AdvancedForm = (props: Props) => {
<InputRow>
<StyledInput
state={getDestinationTagInputState(errors.destinationTag, warnings.destinationTag)}
state={getDestinationTagInputState(
errors.destinationTag,
warnings.destinationTag
)}
autoComplete="off"
autoCorrect="off"
autoCapitalize="off"
spellCheck="false"
topLabel={(
topLabel={
<InputLabelWrapper>
<Left>
<FormattedMessage {...l10nMessages.TR_XRP_DESTINATION_TAG} />
<Tooltip
content={<FormattedMessage {...l10nMessages.TR_XRP_DESTINATION_TAG_EXPLAINED} />}
content={
<FormattedMessage
{...l10nMessages.TR_XRP_DESTINATION_TAG_EXPLAINED}
/>
}
maxWidth={200}
readMoreLink="https://wiki.trezor.io/Ripple_(XRP)"
placement="top"
@ -175,8 +173,10 @@ const AdvancedForm = (props: Props) => {
</Tooltip>
</Left>
</InputLabelWrapper>
)}
bottomText={errors.destinationTag || warnings.destinationTag || infos.destinationTag}
}
bottomText={
errors.destinationTag || warnings.destinationTag || infos.destinationTag
}
value={destinationTag}
onChange={event => onDestinationTagChange(event.target.value)}
/>