From 642c61db449354f486db0eb7d8440e6f603a1e63 Mon Sep 17 00:00:00 2001 From: Jack Mallers Date: Mon, 9 Oct 2017 15:24:22 -0500 Subject: [PATCH] fix(lint): fix linting errors --- .../ModalRoot/SuccessfulSendPayment.js | 22 ++++++++----------- app/reducers/ipc.js | 2 +- test/components/ModalRoot.spec.js | 15 ++++++++++++- 3 files changed, 24 insertions(+), 15 deletions(-) diff --git a/app/components/ModalRoot/SuccessfulSendPayment.js b/app/components/ModalRoot/SuccessfulSendPayment.js index e409251d..d8d74380 100644 --- a/app/components/ModalRoot/SuccessfulSendPayment.js +++ b/app/components/ModalRoot/SuccessfulSendPayment.js @@ -1,23 +1,19 @@ -import { shell } from 'electron' import React from 'react' import PropTypes from 'prop-types' import AnimatedCheckmark from 'components/AnimatedCheckmark' -import { btc } from 'utils' import styles from './SuccessfulSendPayment.scss' -const SuccessfulSendPayment = ({ hideModal }) => { - return ( -
- -

- Successfully sent payment  -

-
+const SuccessfulSendPayment = ({ hideModal }) => ( +
+ +

+ Successfully sent payment  +

+
Done -
- ) -} +
+) SuccessfulSendPayment.propTypes = { hideModal: PropTypes.func.isRequired diff --git a/app/reducers/ipc.js b/app/reducers/ipc.js index 2d819b31..bc67489e 100644 --- a/app/reducers/ipc.js +++ b/app/reducers/ipc.js @@ -48,7 +48,7 @@ const ipc = createIpc({ receiveBalance, lightningPaymentUri, - + paymentSuccessful, channelSuccessful, diff --git a/test/components/ModalRoot.spec.js b/test/components/ModalRoot.spec.js index cbd99af7..05a6dcf2 100644 --- a/test/components/ModalRoot.spec.js +++ b/test/components/ModalRoot.spec.js @@ -2,6 +2,7 @@ import React from 'react' import { shallow } from 'enzyme' import ModalRoot from '../../app/components/ModalRoot' import SuccessfulSendCoins from '../../app/components/ModalRoot/SuccessfulSendCoins' +import SuccessfulSendPayment from '../../app/components/ModalRoot/SuccessfulSendPayment' const defaultProps = { hideModal: () => {}, @@ -32,4 +33,16 @@ describe('SuccessfulSendCoins modal', () => { it('should render specific modal', () => { expect(el.find(SuccessfulSendCoins).length).toBe(1) }) -}); +}) + +describe('SuccessfulSendPayment modal', () => { + const props = { + ...defaultProps, + modalType: 'SUCCESSFUL_SEND_PAYMENT', + modalProps: {} + } + const el = shallow() + it('should render specific modal', () => { + expect(el.find(SuccessfulSendPayment).length).toBe(1) + }) +})