diff --git a/src/components/AccountPage/EmptyStateAccount.js b/src/components/AccountPage/EmptyStateAccount.js index 0cc89db6..f219e628 100644 --- a/src/components/AccountPage/EmptyStateAccount.js +++ b/src/components/AccountPage/EmptyStateAccount.js @@ -54,4 +54,10 @@ class EmptyStateAccount extends PureComponent { } } -export default compose(connect(null, mapDispatchToProps), translate())(EmptyStateAccount) +export default compose( + connect( + null, + mapDispatchToProps, + ), + translate(), +)(EmptyStateAccount) diff --git a/src/components/AccountPage/index.js b/src/components/AccountPage/index.js index a57f54e6..c7f6b139 100644 --- a/src/components/AccountPage/index.js +++ b/src/components/AccountPage/index.js @@ -188,4 +188,10 @@ class AccountPage extends PureComponent { } } -export default compose(connect(mapStateToProps, mapDispatchToProps), translate())(AccountPage) +export default compose( + connect( + mapStateToProps, + mapDispatchToProps, + ), + translate(), +)(AccountPage) diff --git a/src/components/Breadcrumb/index.js b/src/components/Breadcrumb/index.js index 4fb9b983..bf8c3ba7 100644 --- a/src/components/Breadcrumb/index.js +++ b/src/components/Breadcrumb/index.js @@ -54,7 +54,7 @@ const Bar = styled.div` } ` -const indexToPurcent = (index, itemsLength) => 100 - 100 / (itemsLength - 1) * parseInt(index, 10) +const indexToPurcent = (index, itemsLength) => 100 - (100 / (itemsLength - 1)) * parseInt(index, 10) type Props = { currentStep: number | string, diff --git a/src/components/DashboardPage/EmptyState.js b/src/components/DashboardPage/EmptyState.js index 48bf8fc8..6cb66302 100644 --- a/src/components/DashboardPage/EmptyState.js +++ b/src/components/DashboardPage/EmptyState.js @@ -77,4 +77,10 @@ export const Description = styled(Box).attrs({ })` margin: 10px auto 25px; ` -export default compose(connect(null, mapDispatchToProps), translate())(EmptyState) +export default compose( + connect( + null, + mapDispatchToProps, + ), + translate(), +)(EmptyState) diff --git a/src/components/DashboardPage/index.js b/src/components/DashboardPage/index.js index eea708a7..4e43c8f1 100644 --- a/src/components/DashboardPage/index.js +++ b/src/components/DashboardPage/index.js @@ -148,19 +148,21 @@ class DashboardPage extends PureComponent { alignItems="center" style={{ margin: '0 -16px' }} > - {accounts.concat(Array(3 - accounts.length % 3).fill(null)).map((account, i) => ( - - {account ? ( - - ) : null} - - ))} + {accounts + .concat(Array(3 - (accounts.length % 3)).fill(null)) + .map((account, i) => ( + + {account ? ( + + ) : null} + + ))} {displayOperations && ( @@ -182,4 +184,10 @@ class DashboardPage extends PureComponent { } } -export default compose(connect(mapStateToProps, mapDispatchToProps), translate())(DashboardPage) +export default compose( + connect( + mapStateToProps, + mapDispatchToProps, + ), + translate(), +)(DashboardPage) diff --git a/src/components/DeltaChange.js b/src/components/DeltaChange.js index 0178aeda..bfe0a833 100644 --- a/src/components/DeltaChange.js +++ b/src/components/DeltaChange.js @@ -8,7 +8,7 @@ class DeltaChange extends PureComponent<{ }> { render() { const { from, to, ...rest } = this.props - const val = from ? Math.floor((to - from) / from * 100) : 0 + const val = from ? Math.floor(((to - from) / from) * 100) : 0 // TODO in future, we also want to diverge rendering when the % is way too high (this can easily happen) return } diff --git a/src/components/IsUnlocked.js b/src/components/IsUnlocked.js index 5641c49a..7de2bdf3 100644 --- a/src/components/IsUnlocked.js +++ b/src/components/IsUnlocked.js @@ -169,8 +169,13 @@ class IsUnlocked extends Component { } export default compose( - connect(mapStateToProps, mapDispatchToProps, null, { - pure: false, - }), + connect( + mapStateToProps, + mapDispatchToProps, + null, + { + pure: false, + }, + ), translate(), )(IsUnlocked) diff --git a/src/components/MainSideBar.js b/src/components/MainSideBar.js index d1df4bbc..06bcafe6 100644 --- a/src/components/MainSideBar.js +++ b/src/components/MainSideBar.js @@ -169,5 +169,12 @@ const PlusWrapper = styled(Tabbable).attrs({ } ` -const decorate = compose(withRouter, translate(), connect(mapStateToProps, mapDispatchToProps)) +const decorate = compose( + withRouter, + translate(), + connect( + mapStateToProps, + mapDispatchToProps, + ), +) export default decorate(MainSideBar) diff --git a/src/components/ManagerPage/EnsureDevice.js b/src/components/ManagerPage/EnsureDevice.js index 02007e83..9dcee989 100644 --- a/src/components/ManagerPage/EnsureDevice.js +++ b/src/components/ManagerPage/EnsureDevice.js @@ -33,4 +33,7 @@ class EnsureDevice extends PureComponent { } } -export default compose(translate(), connect(mapStateToProps))(EnsureDevice) +export default compose( + translate(), + connect(mapStateToProps), +)(EnsureDevice) diff --git a/src/components/ManagerPage/MemInfos.js b/src/components/ManagerPage/MemInfos.js index c1eb8dc7..dafbe460 100644 --- a/src/components/ManagerPage/MemInfos.js +++ b/src/components/ManagerPage/MemInfos.js @@ -29,7 +29,7 @@ const Step = styled(Box).attrs({ export default function MemInfos(props: { memoryInfos: MemoryInfos }) { const { memoryInfos: infos } = props const totalSize = infos.applicationsSize + infos.systemSize - const appPercent = infos.applicationsSize * 100 / totalSize + const appPercent = (infos.applicationsSize * 100) / totalSize return ( {`${Math.round( diff --git a/src/components/Onboarding/index.js b/src/components/Onboarding/index.js index 0e417533..495ca599 100644 --- a/src/components/Onboarding/index.js +++ b/src/components/Onboarding/index.js @@ -156,4 +156,10 @@ const Container = styled(Box).attrs({ const StepContainer = styled(Box).attrs({ p: 40, })`` -export default compose(connect(mapStateToProps, mapDispatchToProps), translate())(Onboarding) +export default compose( + connect( + mapStateToProps, + mapDispatchToProps, + ), + translate(), +)(Onboarding) diff --git a/src/components/Onboarding/steps/Analytics.js b/src/components/Onboarding/steps/Analytics.js index c9067844..f0537441 100644 --- a/src/components/Onboarding/steps/Analytics.js +++ b/src/components/Onboarding/steps/Analytics.js @@ -99,7 +99,10 @@ class Analytics extends PureComponent { } } -export default connect(null, mapDispatchToProps)(Analytics) +export default connect( + null, + mapDispatchToProps, +)(Analytics) export const AnalyticsText = styled(Box).attrs({ ff: 'Open Sans|Regular', diff --git a/src/components/Onboarding/steps/GenuineCheck.js b/src/components/Onboarding/steps/GenuineCheck.js index c8570848..337b30bc 100644 --- a/src/components/Onboarding/steps/GenuineCheck.js +++ b/src/components/Onboarding/steps/GenuineCheck.js @@ -204,7 +204,10 @@ class GenuineCheck extends PureComponent { } } -export default connect(null, mapDispatchToProps)(GenuineCheck) +export default connect( + null, + mapDispatchToProps, +)(GenuineCheck) // TODO extract to a separate file export function GenuineCheckFail({ diff --git a/src/components/Onboarding/steps/Init.js b/src/components/Onboarding/steps/Init.js index b72699dc..fe2fd881 100644 --- a/src/components/Onboarding/steps/Init.js +++ b/src/components/Onboarding/steps/Init.js @@ -81,7 +81,10 @@ class Init extends PureComponent { } } -export default connect(null, mapDispatchToProps)(Init) +export default connect( + null, + mapDispatchToProps, +)(Init) type CardType = { icon: any, diff --git a/src/components/Onboarding/steps/SelectDevice.js b/src/components/Onboarding/steps/SelectDevice.js index 81ab3cbe..9a99480a 100644 --- a/src/components/Onboarding/steps/SelectDevice.js +++ b/src/components/Onboarding/steps/SelectDevice.js @@ -61,7 +61,10 @@ class SelectDevice extends PureComponent { } } -export default connect(null, mapDispatchToProps)(SelectDevice) +export default connect( + null, + mapDispatchToProps, +)(SelectDevice) const DeviceContainer = styled(Box).attrs({ alignItems: 'center', diff --git a/src/components/RequestAmount/index.js b/src/components/RequestAmount/index.js index 2e5de5d4..605676c6 100644 --- a/src/components/RequestAmount/index.js +++ b/src/components/RequestAmount/index.js @@ -179,4 +179,7 @@ export class RequestAmount extends PureComponent { } } -export default compose(connect(mapStateToProps), translate())(RequestAmount) +export default compose( + connect(mapStateToProps), + translate(), +)(RequestAmount) diff --git a/src/components/SettingsPage/PasswordModal.js b/src/components/SettingsPage/PasswordModal.js index 4ee151a0..9d58b47f 100644 --- a/src/components/SettingsPage/PasswordModal.js +++ b/src/components/SettingsPage/PasswordModal.js @@ -151,4 +151,7 @@ class PasswordModal extends PureComponent { } } -export default connect(null, mapDispatchToProps)(PasswordModal) +export default connect( + null, + mapDispatchToProps, +)(PasswordModal) diff --git a/src/components/SettingsPage/index.js b/src/components/SettingsPage/index.js index 05e580e8..43c5476f 100644 --- a/src/components/SettingsPage/index.js +++ b/src/components/SettingsPage/index.js @@ -130,4 +130,10 @@ class SettingsPage extends PureComponent { } } -export default compose(connect(mapStateToProps, mapDispatchToProps), translate())(SettingsPage) +export default compose( + connect( + mapStateToProps, + mapDispatchToProps, + ), + translate(), +)(SettingsPage) diff --git a/src/components/SettingsPage/sections/Profile.js b/src/components/SettingsPage/sections/Profile.js index 008e2bc8..c2b076f6 100644 --- a/src/components/SettingsPage/sections/Profile.js +++ b/src/components/SettingsPage/sections/Profile.js @@ -212,4 +212,7 @@ class TabProfile extends PureComponent { } } -export default connect(null, mapDispatchToProps)(TabProfile) +export default connect( + null, + mapDispatchToProps, +)(TabProfile) diff --git a/src/components/UpdateNotifier.js b/src/components/UpdateNotifier.js index 92dfd3dc..611240ae 100644 --- a/src/components/UpdateNotifier.js +++ b/src/components/UpdateNotifier.js @@ -90,4 +90,10 @@ class UpdateNotifier extends PureComponent { } } -export default compose(connect(mapStateToProps, null), translate())(UpdateNotifier) +export default compose( + connect( + mapStateToProps, + null, + ), + translate(), +)(UpdateNotifier) diff --git a/src/components/base/Modal/index.js b/src/components/base/Modal/index.js index 26511ea1..0d49dd6c 100644 --- a/src/components/base/Modal/index.js +++ b/src/components/base/Modal/index.js @@ -204,4 +204,7 @@ export const ModalContent = styled(Box).attrs({ pb: 5, })`` -export default connect(mapStateToProps, mapDispatchToProps)(Modal) +export default connect( + mapStateToProps, + mapDispatchToProps, +)(Modal) diff --git a/src/components/layout/Default.js b/src/components/layout/Default.js index cece3bb3..79dba2f4 100644 --- a/src/components/layout/Default.js +++ b/src/components/layout/Default.js @@ -101,4 +101,7 @@ class Default extends Component { } } -export default compose(withRouter, translate())(Default) +export default compose( + withRouter, + translate(), +)(Default) diff --git a/src/components/modals/AccountSettingRenderBody.js b/src/components/modals/AccountSettingRenderBody.js index 7fda1023..1ce382ad 100644 --- a/src/components/modals/AccountSettingRenderBody.js +++ b/src/components/modals/AccountSettingRenderBody.js @@ -198,7 +198,13 @@ class HelperComp extends PureComponent { } } -export default compose(connect(null, mapDispatchToProps), translate())(HelperComp) +export default compose( + connect( + null, + mapDispatchToProps, + ), + translate(), +)(HelperComp) export function InputLeft({ currency }: { currency: Currency }) { return ( diff --git a/src/components/modals/ImportAccounts/index.js b/src/components/modals/ImportAccounts/index.js index 0774bc6f..7f6b464d 100644 --- a/src/components/modals/ImportAccounts/index.js +++ b/src/components/modals/ImportAccounts/index.js @@ -218,7 +218,13 @@ class ImportAccounts extends PureComponent { } } -export default compose(connect(mapStateToProps, mapDispatchToProps), translate())(ImportAccounts) +export default compose( + connect( + mapStateToProps, + mapDispatchToProps, + ), + translate(), +)(ImportAccounts) function idleCallback() { return new Promise(resolve => window.requestIdleCallback(resolve)) diff --git a/src/helpers/SettingsDefaults.js b/src/helpers/SettingsDefaults.js index 998a7328..469c08c2 100644 --- a/src/helpers/SettingsDefaults.js +++ b/src/helpers/SettingsDefaults.js @@ -15,7 +15,7 @@ export const currencySettingsDefaults = ({ }: CryptoCurrency): ConfirmationDefaults => { let confirmationsNb if (blockAvgTime) { - const def = Math.ceil(30 * 60 / blockAvgTime) // 30 min approx validation + const def = Math.ceil((30 * 60) / blockAvgTime) // 30 min approx validation confirmationsNb = { min: 1, def, max: 2 * def } } return {