lint(send): fix send eslint issues

This commit is contained in:
George Lima 2019-01-24 10:56:51 -03:00
parent a028109532
commit 25f418e7bd
3 changed files with 48 additions and 16 deletions

View File

@ -202,7 +202,8 @@ const ValidateStatusIcon = styled.img`
margin-right: 7px;
`;
type Props = SendState & {
type Props = {
...SendState,
balance: number,
zecPrice: number,
addresses: string[],
@ -284,10 +285,11 @@ export class SendView extends PureComponent<Props, State> {
});
};
showModal = (toggle: void => void) => () => {
showModal = (toggle: void => void) => {
const {
from, amount, to, fee,
} = this.state;
// eslint-disable-next-line react/prop-types
const { isToAddressValid } = this.props;
if (!from || !amount || !to || !fee || !isToAddressValid) return;
@ -335,10 +337,13 @@ export class SendView extends PureComponent<Props, State> {
valueSentInUsd,
toggle,
}: {
/* eslint-disable react/no-unused-prop-types */
valueSent: string,
valueSentInUsd: string,
toggle: () => void,
toggle: () => void
/* eslint-enable react/no-unused-prop-types */
}) => {
// eslint-disable-next-line react/prop-types
const { operationId, isSending, error } = this.props;
const { from, to } = this.state;
@ -488,7 +493,10 @@ export class SendView extends PureComponent<Props, State> {
</ShowFeeButton>
{showFee && (
<FeeWrapper>
<RowComponent alignItems='flex-end' justifyContent='space-between'>
<RowComponent
alignItems='flex-end'
justifyContent='space-between'
>
<ColumnComponent width='74%'>
<InputLabelComponent value='Fee' />
<InputComponent
@ -540,7 +548,7 @@ export class SendView extends PureComponent<Props, State> {
label='Send'
variant='secondary'
focused
onClick={this.showModal(toggle)}
onClick={() => this.showModal(toggle)}
/>
)}
showButtons={!isSending && !error && !operationId}

View File

@ -56,11 +56,11 @@
"electron-positioner": "^4.1.0",
"eslint": "^5.8.0",
"eslint-config-airbnb": "^17.1.0",
"eslint-plugin-flowtype": "^3.2.0",
"eslint-plugin-flowtype": "^3.2.1",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jest": "^22.1.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-react": "^7.7.0",
"eslint-plugin-react": "^7.12.4",
"file-loader": "^2.0.0",
"flow-bin": "^0.91.0",
"flow-coverage-report": "^0.6.0",

View File

@ -6419,6 +6419,18 @@ error-stack-parser@^2.0.0:
dependencies:
stackframe "^1.0.4"
es-abstract@^1.11.0:
version "1.13.0"
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.13.0.tgz#ac86145fdd5099d8dd49558ccba2eaf9b88e24e9"
integrity sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==
dependencies:
es-to-primitive "^1.2.0"
function-bind "^1.1.1"
has "^1.0.3"
is-callable "^1.1.4"
is-regex "^1.0.4"
object-keys "^1.0.12"
es-abstract@^1.5.1, es-abstract@^1.6.1, es-abstract@^1.7.0:
version "1.12.0"
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.12.0.tgz#9dbbdd27c6856f0001421ca18782d786bf8a6165"
@ -6430,7 +6442,7 @@ es-abstract@^1.5.1, es-abstract@^1.6.1, es-abstract@^1.7.0:
is-callable "^1.1.3"
is-regex "^1.0.4"
es-to-primitive@^1.1.1:
es-to-primitive@^1.1.1, es-to-primitive@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.0.tgz#edf72478033456e8dda8ef09e00ad9650707f377"
integrity sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==
@ -6550,10 +6562,10 @@ eslint-module-utils@^2.2.0:
debug "^2.6.8"
pkg-dir "^1.0.0"
eslint-plugin-flowtype@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-3.2.0.tgz#824364ed5940a404b91326fdb5a313a2a74760df"
integrity sha512-baJmzngM6UKbEkJ5OY3aGw2zjXBt5L2QKZvTsOlXX7yHKIjNRrlJx2ods8Rng6EdqPR9rVNIQNYHpTs0qfn2qA==
eslint-plugin-flowtype@^3.2.1:
version "3.2.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-3.2.1.tgz#45e032aee54e695dfc41a891e92b7afedfc62c77"
integrity sha512-1lymqM8Cawxu5xsS8TaCrLWJYUmUdoG4hCfa7yWOhCf0qZn/CvI8FxqkhdOP6bAosBn5zeYxKe3Q/4rfKN8a+A==
dependencies:
lodash "^4.17.10"
@ -6592,16 +6604,18 @@ eslint-plugin-jsx-a11y@^6.0.3:
has "^1.0.3"
jsx-ast-utils "^2.0.1"
eslint-plugin-react@^7.7.0:
version "7.11.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.11.1.tgz#c01a7af6f17519457d6116aa94fc6d2ccad5443c"
integrity sha512-cVVyMadRyW7qsIUh3FHp3u6QHNhOgVrLQYdQEB1bPWBsgbNCHdFAeNMquBMCcZJu59eNthX053L70l7gRt4SCw==
eslint-plugin-react@^7.12.4:
version "7.12.4"
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.12.4.tgz#b1ecf26479d61aee650da612e425c53a99f48c8c"
integrity sha512-1puHJkXJY+oS1t467MjbqjvX53uQ05HXwjqDgdbGBqf5j9eeydI54G3KwiJmWciQ0HTBacIKw2jgwSBSH3yfgQ==
dependencies:
array-includes "^3.0.3"
doctrine "^2.1.0"
has "^1.0.3"
jsx-ast-utils "^2.0.1"
object.fromentries "^2.0.0"
prop-types "^15.6.2"
resolve "^1.9.0"
eslint-restricted-globals@^0.1.1:
version "0.1.1"
@ -11702,6 +11716,16 @@ object.entries@^1.0.4:
function-bind "^1.1.0"
has "^1.0.1"
object.fromentries@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.0.tgz#49a543d92151f8277b3ac9600f1e930b189d30ab"
integrity sha512-9iLiI6H083uiqUuvzyY6qrlmc/Gz8hLQFOcb/Ri/0xXFkSNS3ctV+CbE6yM2+AnkYfOB3dGjdzC0wrMLIhQICA==
dependencies:
define-properties "^1.1.2"
es-abstract "^1.11.0"
function-bind "^1.1.1"
has "^1.0.1"
object.getownpropertydescriptors@^2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16"