Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

Commit

Permalink
Merge pull request #3189 from LedgerHQ/develop
Browse files Browse the repository at this point in the history
Prepare 2.13.0
  • Loading branch information
gre authored Sep 24, 2020
2 parents b5d98ed + 7f69fe6 commit 6a27c5a
Show file tree
Hide file tree
Showing 33 changed files with 530 additions and 459 deletions.
2 changes: 1 addition & 1 deletion TERMS.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ In order to accommodate advanced Users' requests and to build new features and f

## Transaction details

**Do not trust. Verify.** Software integrity, especially when connected to the Internet, is very hard to verify. Ledger's security model relies on trusted display.This is why the verification of the information on your Ledger Device is paramount. Before you approve an operation, you must always double check that the information displayed on your mobile or desktop screen is correct and matches the information displayed on your Ledger Device. Upon sending Crypto Assets, you are solely responsible for verifying that the recipient address, amount and fees are correct and that they are the same on both your computer or mobile and on your Ledger Device's screen. You also acknowledge that using unverified addresses to receive Crypto Assets comes at your own risk.
**Do not trust. Verify.** Software integrity, especially when connected to the Internet, is very hard to verify. Ledger's security model relies on trusted display. This is why the verification of the information on your Ledger Device is paramount. Before you approve an operation, you must always double check that the information displayed on your mobile or desktop screen is correct and matches the information displayed on your Ledger Device. Upon sending Crypto Assets, you are solely responsible for verifying that the recipient address, amount and fees are correct and that they are the same on both your computer or mobile and on your Ledger Device's screen. You also acknowledge that using unverified addresses to receive Crypto Assets comes at your own risk.

## Third Party Services and Materials

Expand Down
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@
"@ledgerhq/electron-updater": "^4.2.2",
"@ledgerhq/errors": "^5.23.0",
"@ledgerhq/hw-transport": "^5.23.0",
"@ledgerhq/hw-transport-http": "^5.23.0",
"@ledgerhq/hw-transport-node-hid-singleton": "^5.23.0",
"@ledgerhq/ledger-core": "6.8.10",
"@ledgerhq/live-common": "^14.2.0",
"@ledgerhq/hw-transport-http": "^5.24.0",
"@ledgerhq/hw-transport-node-hid-singleton": "^5.23.2",
"@ledgerhq/ledger-core": "6.9.1",
"@ledgerhq/live-common": "^14.6.0",
"@ledgerhq/logs": "^5.23.0",
"@tippyjs/react": "^4.0.2",
"@trust/keyto": "^1.0.1",
"animated": "^0.2.2",
"async": "^3.2.0",
"axios": "^0.19.1",
"axios": "^0.20.0",
"bignumber.js": "^9.0.0",
"chart.js": "^2.9.3",
"color": "^3.1.2",
Expand All @@ -69,16 +69,16 @@
"lodash": "^4.17.20",
"lru-cache": "^5.1.1",
"measure-scrollbar": "^1.1.0",
"moment": "^2.27.0",
"moment": "^2.28.0",
"node-abi": "^2.19.1",
"openpgp": "^4.10.8",
"os-locale": "^5.0.0",
"os-name": "^3.1.0",
"os-name": "^4.0.0",
"prando": "^5.1.2",
"qrcode": "^1.4.4",
"qrloop": "^1.0.2",
"qs": "^6.9.4",
"query-string": "^6.13.1",
"query-string": "^6.13.2",
"raven": "^2.6.4",
"raven-js": "^3.27.2",
"react": "^16.13.1",
Expand Down Expand Up @@ -107,7 +107,7 @@
"sleep-promise": "^8.0.1",
"smoothscroll-polyfill": "^0.4.4",
"source-map-support": "^0.5.19",
"styled-components": "^5.1.1",
"styled-components": "^5.2.0",
"styled-system": "^5.1.5",
"tippy.js": "^6.2.6",
"tree-kill": "^1.2.2",
Expand All @@ -132,22 +132,22 @@
"@babel/preset-env": "^7.11.5",
"@babel/preset-flow": "^7.10.1",
"@babel/preset-react": "^7.10.1",
"@octokit/rest": "^18.0.3",
"@octokit/rest": "^18.0.6",
"babel-cli": "^6.26.0",
"babel-eslint": "^10.1.0",
"babel-jest": "^25.1.0",
"babel-loader": "^8.1.0",
"babel-plugin-module-resolver": "^4.0.0",
"babel-plugin-styled-components": "^1.10.7",
"babel-plugin-styled-components": "^1.11.1",
"chalk": "^4.1.0",
"copy-webpack-plugin": "^6.0.3",
"copy-webpack-plugin": "^6.1.0",
"cross-env": "^7.0.2",
"css-loader": "^3.5.3",
"electron": "9.2.0",
"electron-builder": "22.8.0",
"electron-devtools-installer": "^3.1.1",
"electron-notarize": "^1.0.0",
"eslint": "^7.5.0",
"eslint": "^7.9.0",
"eslint-config-prettier": "^6.11.0",
"eslint-config-standard": "^14.1.1",
"eslint-plugin-flowtype": "^5.1.3",
Expand All @@ -156,12 +156,12 @@
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-react": "^7.20.5",
"eslint-plugin-react-hooks": "^4.0.4",
"eslint-plugin-react": "^7.20.6",
"eslint-plugin-react-hooks": "^4.1.2",
"eslint-plugin-standard": "^4.0.1",
"execa": "^4.0.2",
"express": "^4.17.1",
"file-loader": "^6.0.0",
"file-loader": "^6.1.0",
"flow-bin": "0.120.1",
"flow-typed": "^2.6.2",
"git-rev-sync": "^2.0.0",
Expand All @@ -177,7 +177,7 @@
"style-loader": "^1.2.1",
"unused-webpack-plugin": "^2.4.0",
"url-loader": "^4.0.0",
"webpack": "^4.43.0",
"webpack": "^4.44.1",
"webpack-cli": "^3.3.11",
"webpack-dev-middleware": "^3.7.2",
"webpack-hot-middleware": "^2.25.0",
Expand Down
15 changes: 8 additions & 7 deletions src/renderer/components/ContextMenu/ContextMenuWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ import type { ThemedComponent } from "~/renderer/styles/StyleProvider";
// $FlowFixMe
export const ContextMenuContext = React.createContext({});

export const withContextMenuContext = (ComponentToDecorate: React$ComponentType<*>) => (
props: *,
) => (
<ContextMenuContext.Consumer>
{context => <ComponentToDecorate {...props} context={context} />}
</ContextMenuContext.Consumer>
);
export const withContextMenuContext = (ComponentToDecorate: React$ComponentType<*>) => {
const WrappedContextMenu = (props: *) => (
<ContextMenuContext.Consumer>
{context => <ComponentToDecorate {...props} context={context} />}
</ContextMenuContext.Consumer>
);
return WrappedContextMenu;
};

export type ContextMenuItemType = {
label: string,
Expand Down
21 changes: 20 additions & 1 deletion src/renderer/components/IsUnlocked.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @flow
import React, { useCallback, useState } from "react";
import React, { useCallback, useEffect, useState } from "react";
import { useSelector, useDispatch } from "react-redux";
import { useTranslation } from "react-i18next";
import styled from "styled-components";
Expand Down Expand Up @@ -124,6 +124,25 @@ const IsUnlocked = ({ children }: Props) => {
}
}, []);

useEffect(() => {
let subscribed = false;
const onKeyDown = () => {
const input = document.getElementById("lockscreen-password-input");
if (input) {
input.focus();
}
};
if (isLocked) {
subscribed = true;
window.addEventListener("keydown", onKeyDown);
}
return () => {
if (subscribed) {
window.removeEventListener("keydown", onKeyDown);
}
};
}, [isLocked]);

if (isLocked) {
return (
<Box sticky alignItems="center" justifyContent="center" id="lockscreen-container">
Expand Down
11 changes: 7 additions & 4 deletions src/renderer/components/PerCurrencySelectAccount/Option.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
} from "@ledgerhq/live-common/lib/account";
import FormattedVal from "~/renderer/components/FormattedVal";
import Ellipsis from "~/renderer/components/Ellipsis";
import Box from "~/renderer/components/Box";
import useTheme from "~/renderer/hooks/useTheme";
import ParentCryptoCurrencyIcon from "~/renderer/components/ParentCryptoCurrencyIcon";
import type { Account, AccountLike, SubAccount } from "@ledgerhq/live-common/lib/types/account";
Expand Down Expand Up @@ -45,6 +46,7 @@ const NestingIndicator: ThemedComponent<{}> = styled.div`
const Left: ThemedComponent<{}> = styled.div`
display: flex;
flex-direction: row;
flex: 1;
`;

const Right: ThemedComponent<{}> = styled.div`
Expand Down Expand Up @@ -88,17 +90,18 @@ function AccountRow({
/>
)}
</IconContainer>
<Ellipsis ff="Inter|SemiBold" fontSize={4}>
{getAccountName(account)}
</Ellipsis>
<Box flex={1}>
<Ellipsis ff="Inter|SemiBold" fontSize={4}>
{getAccountName(account)}
</Ellipsis>
</Box>
</Left>
<Right>
<FormattedVal
color={disabled ? palette.text.shade40 : palette.text.shade60}
val={account.balance}
unit={getAccountUnit(account)}
showCode
disableRounding
/>
</Right>
</AccountRowContainer>
Expand Down
13 changes: 8 additions & 5 deletions src/renderer/components/Updater/UpdaterContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,13 @@ class Provider extends Component<UpdaterProviderProps, UpdaterProviderState> {
}
}

export const withUpdaterContext = (ComponentToDecorate: React$ComponentType<*>) => (props: *) => (
<UpdaterContext.Consumer>
{context => <ComponentToDecorate {...props} context={context} />}
</UpdaterContext.Consumer>
);
export const withUpdaterContext = (ComponentToDecorate: React$ComponentType<*>) => {
const WrappedUpdater = (props: *) => (
<UpdaterContext.Consumer>
{context => <ComponentToDecorate {...props} context={context} />}
</UpdaterContext.Consumer>
);
return WrappedUpdater;
};

export const UpdaterProvider = Provider;
9 changes: 4 additions & 5 deletions src/renderer/createStore.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// @flow

import { createStore, applyMiddleware, compose } from "redux";
// import { routerMiddleware } from 'react-router-redux'
import thunk from "redux-thunk";
import logger from "~/renderer/middlewares/logger";
import analytics from "~/renderer/middlewares/analytics";
Expand All @@ -21,10 +20,10 @@ export default ({ state, dbMiddleware }: Props) => {
if (dbMiddleware) {
middlewares.push(dbMiddleware);
}
const enhancers = compose(
applyMiddleware(...middlewares),
window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__() : f => f, // eslint-disable-line
);

const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
const enhancers = composeEnhancers(applyMiddleware(...middlewares));

// $FlowFixMe
return createStore(reducers, state, enhancers);
};
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ const steps: Array<St> = [
id: "info",
label: <Trans i18nKey="algorand.claimRewards.flow.steps.info.title" />,
component: StepInfo,
noScroll: true,
footer: StepInfoFooter,
},
{
Expand Down
1 change: 0 additions & 1 deletion src/renderer/modals/ClaimRewards/Body.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ const steps: Array<St> = [
id: "rewards",
label: <Trans i18nKey="claimReward.steps.rewards.title" />,
component: StepRewards,
noScroll: true,
footer: StepRewardsFooter,
},
{
Expand Down
13 changes: 13 additions & 0 deletions src/renderer/modals/Send/steps/StepSummary.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ export default class StepSummary extends PureComponent<StepProps> {
const feesUnit = getAccountUnit(mainAccount);
const unit = getAccountUnit(account);

// $FlowFixMe
const memo = transaction.memo;

return (
<Box flow={4} mx={40}>
<TrackPage category="Send Flow" name="Step Summary" />
Expand Down Expand Up @@ -104,6 +107,16 @@ export default class StepSummary extends PureComponent<StepProps> {
</Box>
</Box>
<Separator />
{memo && (
<Box horizontal justifyContent="space-between" mb={2}>
<Text ff="Inter|Medium" color="palette.text.shade40" fontSize={4}>
<Trans i18nKey="operationDetails.extra.memo" />
</Text>
<Text ff="Inter|Medium" fontSize={4}>
{memo}
</Text>
</Box>
)}
<Box horizontal justifyContent="space-between" mb={2}>
<Text ff="Inter|Medium" color="palette.text.shade40" fontSize={4}>
<Trans i18nKey="send.steps.details.amount" />
Expand Down
25 changes: 0 additions & 25 deletions src/renderer/screens/account/AccountActionsDefault.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import IconReceive from "~/renderer/icons/Receive";
import IconSend from "~/renderer/icons/Send";
import Box from "~/renderer/components/Box";
import Button from "~/renderer/components/Button";
import type { Currency } from "@ledgerhq/live-common/lib/types";
import IconExchange from "~/renderer/icons/Exchange";

export const SendActionDefault = ({ onClick }: { onClick: () => void }) => (
<Button small primary onClick={onClick}>
Expand All @@ -29,26 +27,3 @@ export const ReceiveActionDefault = ({ onClick }: { onClick: () => void }) => (
</Box>
</Button>
);

export const BuyActionDefault = ({
onClick,
currency,
}: {
onClick: () => void,
currency: Currency,
}) => (
<Button
small
primary
onClick={onClick}
event="Buy Crypto Account Button"
eventProperties={{ currencyName: currency.name }}
>
<Box horizontal flow={1} alignItems="center">
<IconExchange size={12} />
<Box>
<Trans i18nKey="buy.titleCrypto" values={{ currency: currency.name }} />
</Box>
</Box>
</Button>
);
Loading

0 comments on commit 6a27c5a

Please sign in to comment.