Browse Source
Prettify again our code after prettier update
master
meriadec
7 years ago
No known key found for this signature in database
GPG Key ID: 1D2FC2305E2CB399
25 changed files with
138 additions and
40 deletions
-
src/components/AccountPage/EmptyStateAccount.js
-
src/components/AccountPage/index.js
-
src/components/Breadcrumb/index.js
-
src/components/DashboardPage/EmptyState.js
-
src/components/DashboardPage/index.js
-
src/components/DeltaChange.js
-
src/components/IsUnlocked.js
-
src/components/MainSideBar.js
-
src/components/ManagerPage/EnsureDevice.js
-
src/components/ManagerPage/MemInfos.js
-
src/components/Onboarding/index.js
-
src/components/Onboarding/steps/Analytics.js
-
src/components/Onboarding/steps/GenuineCheck.js
-
src/components/Onboarding/steps/Init.js
-
src/components/Onboarding/steps/SelectDevice.js
-
src/components/RequestAmount/index.js
-
src/components/SettingsPage/PasswordModal.js
-
src/components/SettingsPage/index.js
-
src/components/SettingsPage/sections/Profile.js
-
src/components/UpdateNotifier.js
-
src/components/base/Modal/index.js
-
src/components/layout/Default.js
-
src/components/modals/AccountSettingRenderBody.js
-
src/components/modals/ImportAccounts/index.js
-
src/helpers/SettingsDefaults.js
|
|
@ -54,4 +54,10 @@ class EmptyStateAccount extends PureComponent<Props, *> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
export default compose(connect(null, mapDispatchToProps), translate())(EmptyStateAccount) |
|
|
|
export default compose( |
|
|
|
connect( |
|
|
|
null, |
|
|
|
mapDispatchToProps, |
|
|
|
), |
|
|
|
translate(), |
|
|
|
)(EmptyStateAccount) |
|
|
|
|
|
@ -188,4 +188,10 @@ class AccountPage extends PureComponent<Props, State> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
export default compose(connect(mapStateToProps, mapDispatchToProps), translate())(AccountPage) |
|
|
|
export default compose( |
|
|
|
connect( |
|
|
|
mapStateToProps, |
|
|
|
mapDispatchToProps, |
|
|
|
), |
|
|
|
translate(), |
|
|
|
)(AccountPage) |
|
|
|
|
|
@ -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, |
|
|
|
|
|
@ -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) |
|
|
|
|
|
@ -148,19 +148,21 @@ class DashboardPage extends PureComponent<Props, State> { |
|
|
|
alignItems="center" |
|
|
|
style={{ margin: '0 -16px' }} |
|
|
|
> |
|
|
|
{accounts.concat(Array(3 - accounts.length % 3).fill(null)).map((account, i) => ( |
|
|
|
<Box key={account ? account.id : `placeholder_${i}`} flex="33%" p={16}> |
|
|
|
{account ? ( |
|
|
|
<AccountCard |
|
|
|
key={account.id} |
|
|
|
counterValue={counterValue} |
|
|
|
account={account} |
|
|
|
daysCount={daysCount} |
|
|
|
onClick={this.onAccountClick} |
|
|
|
/> |
|
|
|
) : null} |
|
|
|
</Box> |
|
|
|
))} |
|
|
|
{accounts |
|
|
|
.concat(Array(3 - (accounts.length % 3)).fill(null)) |
|
|
|
.map((account, i) => ( |
|
|
|
<Box key={account ? account.id : `placeholder_${i}`} flex="33%" p={16}> |
|
|
|
{account ? ( |
|
|
|
<AccountCard |
|
|
|
key={account.id} |
|
|
|
counterValue={counterValue} |
|
|
|
account={account} |
|
|
|
daysCount={daysCount} |
|
|
|
onClick={this.onAccountClick} |
|
|
|
/> |
|
|
|
) : null} |
|
|
|
</Box> |
|
|
|
))} |
|
|
|
</Box> |
|
|
|
</Box> |
|
|
|
{displayOperations && ( |
|
|
@ -182,4 +184,10 @@ class DashboardPage extends PureComponent<Props, State> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
export default compose(connect(mapStateToProps, mapDispatchToProps), translate())(DashboardPage) |
|
|
|
export default compose( |
|
|
|
connect( |
|
|
|
mapStateToProps, |
|
|
|
mapDispatchToProps, |
|
|
|
), |
|
|
|
translate(), |
|
|
|
)(DashboardPage) |
|
|
|
|
|
@ -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 <FormattedVal isPercent val={val} {...rest} /> |
|
|
|
} |
|
|
|
|
|
@ -169,8 +169,13 @@ class IsUnlocked extends Component<Props, State> { |
|
|
|
} |
|
|
|
|
|
|
|
export default compose( |
|
|
|
connect(mapStateToProps, mapDispatchToProps, null, { |
|
|
|
pure: false, |
|
|
|
}), |
|
|
|
connect( |
|
|
|
mapStateToProps, |
|
|
|
mapDispatchToProps, |
|
|
|
null, |
|
|
|
{ |
|
|
|
pure: false, |
|
|
|
}, |
|
|
|
), |
|
|
|
translate(), |
|
|
|
)(IsUnlocked) |
|
|
|
|
|
@ -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) |
|
|
|
|
|
@ -33,4 +33,7 @@ class EnsureDevice extends PureComponent<Props, State> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
export default compose(translate(), connect(mapStateToProps))(EnsureDevice) |
|
|
|
export default compose( |
|
|
|
translate(), |
|
|
|
connect(mapStateToProps), |
|
|
|
)(EnsureDevice) |
|
|
|
|
|
@ -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 ( |
|
|
|
<Container> |
|
|
|
<Step c="wallet" percent={appPercent}>{`${Math.round( |
|
|
|
|
|
@ -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) |
|
|
|
|
|
@ -99,7 +99,10 @@ class Analytics extends PureComponent<StepProps, State> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
export default connect(null, mapDispatchToProps)(Analytics) |
|
|
|
export default connect( |
|
|
|
null, |
|
|
|
mapDispatchToProps, |
|
|
|
)(Analytics) |
|
|
|
|
|
|
|
export const AnalyticsText = styled(Box).attrs({ |
|
|
|
ff: 'Open Sans|Regular', |
|
|
|
|
|
@ -204,7 +204,10 @@ class GenuineCheck extends PureComponent<StepProps, State> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
export default connect(null, mapDispatchToProps)(GenuineCheck) |
|
|
|
export default connect( |
|
|
|
null, |
|
|
|
mapDispatchToProps, |
|
|
|
)(GenuineCheck) |
|
|
|
|
|
|
|
// TODO extract to a separate file
|
|
|
|
export function GenuineCheckFail({ |
|
|
|
|
|
@ -81,7 +81,10 @@ class Init extends PureComponent<StepProps, *> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
export default connect(null, mapDispatchToProps)(Init) |
|
|
|
export default connect( |
|
|
|
null, |
|
|
|
mapDispatchToProps, |
|
|
|
)(Init) |
|
|
|
|
|
|
|
type CardType = { |
|
|
|
icon: any, |
|
|
|
|
|
@ -61,7 +61,10 @@ class SelectDevice extends PureComponent<StepProps, {}> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
export default connect(null, mapDispatchToProps)(SelectDevice) |
|
|
|
export default connect( |
|
|
|
null, |
|
|
|
mapDispatchToProps, |
|
|
|
)(SelectDevice) |
|
|
|
|
|
|
|
const DeviceContainer = styled(Box).attrs({ |
|
|
|
alignItems: 'center', |
|
|
|
|
|
@ -179,4 +179,7 @@ export class RequestAmount extends PureComponent<Props> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
export default compose(connect(mapStateToProps), translate())(RequestAmount) |
|
|
|
export default compose( |
|
|
|
connect(mapStateToProps), |
|
|
|
translate(), |
|
|
|
)(RequestAmount) |
|
|
|
|
|
@ -151,4 +151,7 @@ class PasswordModal extends PureComponent<Props, State> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
export default connect(null, mapDispatchToProps)(PasswordModal) |
|
|
|
export default connect( |
|
|
|
null, |
|
|
|
mapDispatchToProps, |
|
|
|
)(PasswordModal) |
|
|
|
|
|
@ -130,4 +130,10 @@ class SettingsPage extends PureComponent<Props, State> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
export default compose(connect(mapStateToProps, mapDispatchToProps), translate())(SettingsPage) |
|
|
|
export default compose( |
|
|
|
connect( |
|
|
|
mapStateToProps, |
|
|
|
mapDispatchToProps, |
|
|
|
), |
|
|
|
translate(), |
|
|
|
)(SettingsPage) |
|
|
|
|
|
@ -212,4 +212,7 @@ class TabProfile extends PureComponent<Props, State> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
export default connect(null, mapDispatchToProps)(TabProfile) |
|
|
|
export default connect( |
|
|
|
null, |
|
|
|
mapDispatchToProps, |
|
|
|
)(TabProfile) |
|
|
|
|
|
@ -90,4 +90,10 @@ class UpdateNotifier extends PureComponent<Props> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
export default compose(connect(mapStateToProps, null), translate())(UpdateNotifier) |
|
|
|
export default compose( |
|
|
|
connect( |
|
|
|
mapStateToProps, |
|
|
|
null, |
|
|
|
), |
|
|
|
translate(), |
|
|
|
)(UpdateNotifier) |
|
|
|
|
|
@ -204,4 +204,7 @@ export const ModalContent = styled(Box).attrs({ |
|
|
|
pb: 5, |
|
|
|
})`` |
|
|
|
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(Modal) |
|
|
|
export default connect( |
|
|
|
mapStateToProps, |
|
|
|
mapDispatchToProps, |
|
|
|
)(Modal) |
|
|
|
|
|
@ -101,4 +101,7 @@ class Default extends Component<Props> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
export default compose(withRouter, translate())(Default) |
|
|
|
export default compose( |
|
|
|
withRouter, |
|
|
|
translate(), |
|
|
|
)(Default) |
|
|
|
|
|
@ -198,7 +198,13 @@ class HelperComp extends PureComponent<Props, State> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
export default compose(connect(null, mapDispatchToProps), translate())(HelperComp) |
|
|
|
export default compose( |
|
|
|
connect( |
|
|
|
null, |
|
|
|
mapDispatchToProps, |
|
|
|
), |
|
|
|
translate(), |
|
|
|
)(HelperComp) |
|
|
|
|
|
|
|
export function InputLeft({ currency }: { currency: Currency }) { |
|
|
|
return ( |
|
|
|
|
|
@ -218,7 +218,13 @@ class ImportAccounts extends PureComponent<Props, State> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
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)) |
|
|
|
|
|
@ -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 { |
|
|
|