Skip to content

Commit 0369b6c

Browse files
author
Maurice Dalderup
authored
Merge pull request #1363 from nos/develop
[RELEASE] 0.6.4
2 parents 7bb2db7 + 7504fd2 commit 0369b6c

File tree

8 files changed

+2530
-2646
lines changed

8 files changed

+2530
-2646
lines changed

.circleci/config.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
version: 2.1
22

33
orbs:
4-
codecov: codecov/codecov@1.0.5
4+
codecov: codecov/codecov@1.1.0
55

66
references:
77
workspace: &workspace ~/repo
88

99
linux_config: &linux_config
1010
docker:
11-
- image: circleci/node:10.21.0
11+
- image: circleci/node:10.22.0
1212
working_directory: *workspace
1313

1414
windows_config: &windows_config

package.json

+24-24
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"repository": "https://www.github.com/nos/client",
55
"author": "nOS",
66
"homepage": "https://nos.io",
7-
"version": "0.6.3",
7+
"version": "0.6.4",
88
"private": true,
99
"main": "dist/main/main.js",
1010
"license": "MIT",
@@ -19,26 +19,26 @@
1919
"@fortawesome/react-fontawesome": "0.1.8",
2020
"@ledgerhq/hw-transport-node-hid": "4.18.0",
2121
"@nosplatform/react-copy-to-clipboard": "5.0.1",
22-
"about-window": "1.13.2",
22+
"about-window": "1.13.4",
2323
"babel-polyfill": "6.26.0",
2424
"bignumber.js": "9.0.0",
2525
"bip32": "2.0.4",
2626
"bip39": "3.0.2",
2727
"classnames": "2.2.6",
2828
"coingecko-api": "1.0.8",
2929
"connected-react-router": "5.0.1",
30-
"ejs": "3.0.1",
30+
"ejs": "3.1.5",
3131
"electron-context-menu": "0.11.0",
3232
"electron-is-dev": "0.3.0",
33-
"electron-json-storage": "4.1.8",
33+
"electron-json-storage": "4.2.0",
3434
"electron-localshortcut": "3.2.1",
3535
"electron-updater": "3.2.3",
36-
"es6-promisify": "6.0.2",
36+
"es6-promisify": "6.1.1",
3737
"ethereumjs-utils": "5.2.5",
3838
"file-type": "12.4.2",
3939
"format-currency": "1.0.0",
4040
"history": "4.10.1",
41-
"lodash": "4.17.15",
41+
"lodash": "4.17.20",
4242
"mime-types": "2.1.25",
4343
"node-fetch": "2.6.0",
4444
"prop-types": "15.7.2",
@@ -50,19 +50,19 @@
5050
"react-is": "16.8.6",
5151
"react-redux": "5.1.1",
5252
"react-router-dom": "4.3.1",
53-
"react-scroll": "1.7.15",
53+
"react-scroll": "1.8.1",
5454
"react-sticky": "6.0.3",
5555
"recharts": "1.8.5",
5656
"recompose": "0.30.0",
5757
"redux": "4.0.5",
5858
"redux-saga": "0.16.2",
5959
"redux-thunk": "2.3.0",
6060
"sifter": "0.5.3",
61-
"snyk": "1.360.0",
62-
"source-map-support": "0.5.16",
61+
"snyk": "1.381.1",
62+
"source-map-support": "0.5.19",
6363
"spunky": "1.3.1",
6464
"switch-tree": "0.2.2",
65-
"unique-names-generator": "4.1.1",
65+
"unique-names-generator": "4.3.0",
6666
"uuid": "3.3.3",
6767
"what-input": "5.2.6",
6868
"whatwg-url": "7.1.0"
@@ -92,16 +92,16 @@
9292
"snyk-test": "snyk test"
9393
},
9494
"devDependencies": {
95-
"babel-eslint": "10.0.3",
95+
"babel-eslint": "10.1.0",
9696
"babel-jest": "23.6.0",
97-
"babel-plugin-dynamic-import-node": "2.3.0",
97+
"babel-plugin-dynamic-import-node": "2.3.3",
9898
"babel-plugin-module-resolver": "4.0.0",
9999
"babel-plugin-syntax-dynamic-import": "6.18.0",
100100
"babel-plugin-transform-class-properties": "6.24.1",
101101
"babel-plugin-transform-es2015-classes": "6.24.1",
102102
"babel-plugin-transform-object-rest-spread": "6.26.0",
103103
"babel-preset-react": "6.24.1",
104-
"codecov": "3.6.5",
104+
"codecov": "3.7.1",
105105
"cross-env": "6.0.3",
106106
"css-loader": "3.4.0",
107107
"cssnano": "4.1.10",
@@ -111,14 +111,14 @@
111111
"electron-webpack": "1.13.0",
112112
"enzyme": "3.11.0",
113113
"enzyme-adapter-react-16": "1.15.2",
114-
"eslint": "6.8.0",
115-
"eslint-config-airbnb": "18.0.1",
114+
"eslint": "7.7.0",
115+
"eslint-config-airbnb": "18.2.0",
116116
"eslint-config-prettier": "6.9.0",
117117
"eslint-import-resolver-babel-module": "5.1.0",
118118
"eslint-plugin-import": "2.19.1",
119119
"eslint-plugin-jest": "23.2.0",
120-
"eslint-plugin-jsx-a11y": "6.2.3",
121-
"eslint-plugin-prettier": "3.1.2",
120+
"eslint-plugin-jsx-a11y": "6.3.1",
121+
"eslint-plugin-prettier": "3.1.4",
122122
"eslint-plugin-react": "7.17.0",
123123
"identity-obj-proxy": "3.0.0",
124124
"jest": "23.6.0",
@@ -129,21 +129,21 @@
129129
"npm-run-all": "4.1.5",
130130
"postcss-loader": "3.0.0",
131131
"prettier": "1.19.1",
132-
"react-hot-loader": "4.12.18",
132+
"react-hot-loader": "4.12.21",
133133
"react-router-test-context": "0.1.0",
134134
"redux-devtools-extension": "2.13.8",
135135
"redux-mock-store": "1.5.4",
136-
"rimraf": "3.0.0",
136+
"rimraf": "3.0.2",
137137
"sass-loader": "7.3.1",
138-
"standard-version": "7.0.1",
138+
"standard-version": "8.0.1",
139139
"style-loader": "0.23.1",
140-
"stylelint": "12.0.1",
141-
"stylelint-config-recommended-scss": "4.1.0",
142-
"stylelint-scss": "3.13.0",
140+
"stylelint": "13.6.1",
141+
"stylelint-config-recommended-scss": "4.2.0",
142+
"stylelint-scss": "3.18.0",
143143
"svg-react-loader": "0.4.6",
144144
"wait-on": "3.3.0",
145145
"webpack": "3.12.0",
146-
"webpack-cli": "3.3.10",
146+
"webpack-cli": "3.3.12",
147147
"webpack-dev-server": "2.11.5",
148148
"webpack-merge": "4.2.2"
149149
},
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,12 @@
11
import React from 'react';
2-
import { func, string } from 'prop-types';
32

43
import Page from 'shared/components/Page';
5-
import blockShape from 'shared/shapes/blockShape';
64

75
import AccountPanel from './AccountPanel';
86
import TransactionsPanel from './TransactionsPanel';
97
import styles from './Portfolio.scss';
108

119
export default class Portfolio extends React.PureComponent {
12-
componentDidUpdate(prevProps) {
13-
if (prevProps.block.index < this.props.block.index) {
14-
this.props.balancesWithPrices({
15-
currency: this.props.currency,
16-
net: this.props.net,
17-
address: this.props.address
18-
});
19-
}
20-
}
21-
2210
render() {
2311
return (
2412
<div className={styles.account}>
@@ -31,12 +19,6 @@ export default class Portfolio extends React.PureComponent {
3119
}
3220
}
3321

34-
Portfolio.propTypes = {
35-
block: blockShape.isRequired,
36-
balancesWithPrices: func.isRequired,
37-
currency: string.isRequired,
38-
net: string.isRequired,
39-
address: string.isRequired
40-
};
22+
Portfolio.propTypes = {};
4123

4224
Portfolio.defaultProps = {};

src/renderer/auth/components/AuthPanel/AuthPanel.js

+20
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
/* eslint-disable react/no-unescaped-entities */
12
/* eslint-disable consistent-return */
23

34
import React from 'react';
45
import classNames from 'classnames';
56
import { string, node, bool, func } from 'prop-types';
67

8+
import { EXTERNAL } from 'browser/values/browserValues';
79
import SidePanel from 'shared/components/SidePanel';
10+
import TabLink from 'root/components/AuthenticatedLayout/TabLink';
811
import CloseIcon from 'shared/images/icons/close-modal.svg';
912

1013
import styles from './AuthPanel.scss';
@@ -21,13 +24,30 @@ export default function AuthPanel({
2124
footer,
2225
footerText
2326
}) {
27+
const handleOnLink = () => {
28+
onCancel();
29+
};
30+
2431
return (
2532
<div className={classNames(styles.authPanel, className)}>
2633
{sidePanel && <SidePanel step={step} title={sidePanelTitle} text={sidePanelText} />}
2734

2835
<div className={styles.content}>
2936
<CloseIcon className={styles.closeIcon} onClick={onCancel} />
3037
{children}
38+
{step === '1' && (
39+
<div onClick={handleOnLink} role="button" tabIndex={0}>
40+
<TabLink
41+
className={styles.returningUser}
42+
id="blog"
43+
styling={false}
44+
type={EXTERNAL}
45+
target="https://docs.nos.io/docs/nos-client/import-neo-wallet.html"
46+
>
47+
Can't find your old account? Click here to learn how to import it!
48+
</TabLink>
49+
</div>
50+
)}
3151
{footer && (
3252
<div className={styles.footer} onClick={redirect} role="button" tabIndex={0}>
3353
<div className={styles.text}>{footerText}</div>

src/renderer/auth/components/AuthPanel/AuthPanel.scss

+17
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,23 @@
1010
align-self: flex-end;
1111
cursor: pointer;
1212
}
13+
14+
.returningUser {
15+
display: flex;
16+
justify-content: center;
17+
padding-bottom: 10px;
18+
19+
cursor: pointer;
20+
font-weight: 500;
21+
font-size: 12px;
22+
line-height: 12px;
23+
user-select: none;
24+
color: #ffad00;
25+
26+
&:hover {
27+
color: #d8d400;
28+
}
29+
}
1330
}
1431

1532
.footer {

src/renderer/root/components/AuthenticatedLayout/TabLink/TabLink.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ export default class TabLink extends React.PureComponent {
1515
active: bool,
1616
disabled: bool,
1717
children: node,
18-
openTab: func
18+
openTab: func,
19+
styling: bool
1920
};
2021

2122
static defaultProps = {
@@ -25,11 +26,12 @@ export default class TabLink extends React.PureComponent {
2526
active: false,
2627
disabled: false,
2728
children: null,
28-
openTab: noop
29+
openTab: noop,
30+
styling: true
2931
};
3032

3133
render() {
32-
const className = classNames(this.props.className, styles.tabLink, {
34+
const className = classNames(this.props.className, this.props.styling ? styles.tabLink : null, {
3335
[styles.active]: this.props.active,
3436
[styles.disabled]: this.props.disabled
3537
});

src/renderer/root/components/AuthenticatedLayout/index.js

+20-1
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@ import { isEqual } from 'lodash';
66
import authActions from 'auth/actions/authActions';
77
import blockActions from 'shared/actions/blockActions';
88
import withAuthState from 'auth/hocs/withAuthState';
9+
import withAuthData from 'shared/hocs/withAuthData';
910
import withNetworkData from 'shared/hocs/withNetworkData';
1011
import withProgressChange from 'shared/hocs/withProgressChange';
1112
import notifyWebviews from 'shared/util/notifyWebviews';
13+
import balanceWithPricesActions from 'account/actions/balanceWithPricesActions';
14+
import currencyActions from 'settings/actions/currencyActions';
1215

1316
import AuthenticatedLayout from './AuthenticatedLayout';
1417

@@ -20,27 +23,43 @@ const mapStateToProps = (state) => {
2023
};
2124

2225
const mapAuthDataToProps = (props) => ({
23-
address: (props && props.address) || undefined
26+
address: (props && props.auth && props.auth.wallet && props.auth.wallet.address) || undefined
2427
});
2528

29+
const mapCurrencyDataToProps = (currency) => ({ currency });
30+
2631
const mapBlockActionsToProps = (actions, props) => ({
2732
getLastBlock: () => actions.call({ net: props.currentNetwork })
2833
});
2934

35+
const mapbalanceWithPricesActionsToProps = (actions) => ({
36+
balancesWithPrices: (data) => actions.call(data)
37+
});
38+
3039
const mapBlockDataToProps = (block) => ({ block });
3140

3241
export default compose(
3342
connect(mapStateToProps),
3443
withAuthState(),
44+
withData(currencyActions, mapCurrencyDataToProps),
45+
withAuthData(),
3546
withNetworkData('currentNetwork'),
3647
withActions(blockActions, mapBlockActionsToProps),
48+
withActions(balanceWithPricesActions, mapbalanceWithPricesActionsToProps),
3749

3850
// Whenever a new block is received, notify all dApps & update account balances.
3951
withData(authActions, mapAuthDataToProps),
4052
withData(blockActions, mapBlockDataToProps),
4153
withProgressChange(blockActions, LOADED, (state, props, prevProps) => {
4254
if (!isEqual(props.block, prevProps.block)) {
4355
notifyWebviews('event', 'block', props.block);
56+
if (props.authenticated) {
57+
props.balancesWithPrices({
58+
currency: props.currency,
59+
net: props.currentNetwork,
60+
address: props.auth.wallet.address
61+
});
62+
}
4463
}
4564
})
4665
)(AuthenticatedLayout);

0 commit comments

Comments
 (0)