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

Commit

Permalink
Merge branch develop into branch feature/realm
Browse files Browse the repository at this point in the history
  • Loading branch information
laumair committed Dec 20, 2018
2 parents 81501f0 + e2c6593 commit 79214b8
Show file tree
Hide file tree
Showing 90 changed files with 1,955 additions and 1,700 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@
"babel-eslint": "^8.2.2",
"eslint": "^4.18.1",
"eslint-config-airbnb": "^16.1.0",
"eslint-config-prettier": "^2.9.0",
"eslint-config-prettier": "^3.3.0",
"eslint-plugin-babel": "^4.1.2",
"eslint-plugin-import": "^2.9.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-jsx-a11y": "^6.1.2",
"eslint-plugin-react": "^7.7.0",
"eslint-plugin-react-native": "^3.2.1",
"husky": "^1.2.0",
Expand Down
1 change: 1 addition & 0 deletions src/desktop/native/hardware/Ledger.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'babel-polyfill';
import Transport from '@ledgerhq/hw-transport-node-hid';
import Iota from 'hw-app-iota';
import { ipcRenderer as ipc, remote } from 'electron';
Expand Down
1,970 changes: 954 additions & 1,016 deletions src/desktop/npm-shrinkwrap.json

Large diffs are not rendered by default.

39 changes: 20 additions & 19 deletions src/desktop/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "trinity-desktop",
"productName": "Trinity",
"version": "0.4.3",
"version": "0.4.5",
"private": true,
"url": "https://trinity.iota.org",
"homepage": "https://trinity.iota.org",
Expand Down Expand Up @@ -36,18 +36,18 @@
},
"devDependencies": {
"@babel/core": "^7.2.0",
"@babel/plugin-proposal-class-properties": "^7.1.0",
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
"@babel/preset-env": "^7.1.0",
"@babel/plugin-proposal-class-properties": "^7.2.1",
"@babel/plugin-proposal-object-rest-spread": "^7.2.0",
"@babel/preset-env": "^7.2.0",
"@babel/preset-react": "^7.0.0",
"babel-loader": "^8.0.4",
"bugsnag-build-reporter": "^1.0.0",
"bugsnag-sourcemaps": "^1.0.4",
"concurrently": "^4.0.1",
"bugsnag-build-reporter": "^1.0.1",
"bugsnag-sourcemaps": "^1.0.5",
"concurrently": "^4.1.0",
"cross-env": "^5.2.0",
"css-loader": "^1.0.0",
"dart-sass": "^1.14.1",
"electron": "^3.0.10",
"css-loader": "^2.0.0",
"dart-sass": "^1.15.2",
"electron": "^3.0.11",
"electron-builder": "^20.38",
"electron-devtools-installer": "^2.2.4",
"electron-screenshot": "^1.0.5",
Expand All @@ -57,12 +57,12 @@
"mini-css-extract-plugin": "^0.5.0",
"patch-package": "^5.1.1",
"puppeteer": "^1.11.0",
"react-dev-utils": "^6.0.4",
"react-dev-utils": "^6.1.1",
"rimraf": "^2.6.2",
"sass-loader": "^7.1.0",
"style-loader": "^0.23.0",
"url-loader": "^1.1.1",
"webpack": "^4.20.2",
"webpack": "^4.27.1",
"webpack-cli": "^3.1.2",
"webpack-dev-middleware": "^3.4.0",
"webpack-hot-middleware": "^2.24.2"
Expand Down Expand Up @@ -137,32 +137,33 @@
},
"dependencies": {
"@babel/register": "^7.0.0",
"@ledgerhq/hw-transport-node-hid": "^4.24.0",
"@ledgerhq/hw-transport-node-hid": "^4.32.0",
"argon2": "rihardsgravis/node-argon2#prebuild-release",
"authenticator": "^1.1.5",
"babel-polyfill": "^6.26.0",
"bugsnag-js": "^4.7.3",
"bugsnag-react": "^1.1.1",
"classnames": "^2.2.6",
"electron-settings": "^3.2.0",
"electron-updater": "4.0.4",
"entangled-node": "rihardsgravis/entangled-node#v0.1.3",
"hw-app-iota": "^0.5.1",
"i18next": "^12.0.0",
"i18next": "^12.1.0",
"iota.lib.js": "^0.5.1",
"kdbxweb": "^1.2.4",
"kdbxweb": "^1.2.5",
"keytar": "^4.3.0",
"machine-uuid-sync": "https://github.com/rajivshah3/machine-uuid-sync",
"perfect-scrollbar": "^1.4.0",
"qr.js": "^0.0.0",
"react": "^16.5.2",
"react-dom": "^16.5.2",
"react-i18next": "^8.0.7",
"react": "^16.6.3",
"react-dom": "^16.6.3",
"react-i18next": "^8.3.8",
"react-lottie": "^1.2.3",
"react-markdown": "^3.6.0",
"react-qr-reader": "^2.1.1",
"react-redux": "^5.0.7",
"react-router-dom": "^4.3.1",
"react-transition-group": "^2.5.0",
"react-transition-group": "^2.5.1",
"realm": "^2.21.0",
"recharts": "^1.4.1",
"redux": "^4.0.0"
Expand Down
1 change: 1 addition & 0 deletions src/desktop/src/libs/SeedStore/Keychain.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ class Keychain {
const vaultSeed = await decrypt(account.password, this.key);

if (
vaultSeed &&
vaultSeed.length === seed.length &&
seed.every((v, x) => {
return v % 27 === vaultSeed[x] % 27;
Expand Down
1 change: 1 addition & 0 deletions src/desktop/src/ui/Index.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ class App extends React.Component {
this.props.setAccountInfoDuringSetup({
name: '',
meta: {},
completed: false,
usedExistingSeed: false,
});
Electron.setOnboardingSeed(null);
Expand Down
2 changes: 1 addition & 1 deletion src/desktop/src/ui/components/icon.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@font-face {
font-family: 'Icons';
src: url('icons/Icons.ttf') format('truetype');
src: url('~icons/Icons.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
Expand Down
20 changes: 20 additions & 0 deletions src/desktop/src/ui/global/About.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,26 @@ class About extends React.PureComponent {

<article>
<Scrollbar>
<h5>0.4.5</h5>
<ul>
<li>- Hotfix: Block requests to nodes running beta, alpha and release IRI releases</li>
<li>- Fix: On unique seed check if target seed exists</li>
<li>- Fix: Wallet crashes after succesfully sending transactions</li>
</ul>
<h5>0.4.4</h5>
<ul>
<li>- Update: Unified general and account settings view</li>
<li>- Update: Require two-factor authentication on view seed and wallet reset</li>
<li>- Update: Input field context menu localisation</li>
<li>- Update: Highlight address checksum on all views</li>
<li>- Update: Check for a unique seed for local accounts</li>
<li>- Fix: Address generation above index 255 not working</li>
<li>- Fix: Main menu not visible on light themes</li>
<li>- Fix: Password not updated for all account types</li>
<li>- Fix: Incomplete account addition freezes wallet</li>
<li>- Fix: Linux: Incorrect Missing dependencies warnging</li>
<li>- Fix: Windows: Allow wallet window resize on top edge</li>
</ul>
<h5>0.4.3</h5>
<ul>
<li>- Add: System network proxy ignore setting</li>
Expand Down
8 changes: 4 additions & 4 deletions src/desktop/src/ui/style/_typography.scss
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
@font-face {
font-family: 'SourceSansPro';
src: url(custom-fonts/SourceSansPro-Light.ttf) format('truetype');
src: url('~custom-fonts/SourceSansPro-Light.ttf') format('truetype');
font-weight: 200;
}
@font-face {
font-family: 'SourceSansPro';
src: url(custom-fonts/SourceSansPro-Regular.ttf) format('truetype');
src: url('~custom-fonts/SourceSansPro-Regular.ttf') format('truetype');
font-weight: 300;
}
@font-face {
font-family: 'SourceSansPro';
src: url(custom-fonts/SourceSansPro-SemiBold.ttf) format('truetype');
src: url('~custom-fonts/SourceSansPro-SemiBold.ttf') format('truetype');
font-weight: 400;
}
@font-face {
font-family: 'SourceCodePro';
src: url(custom-fonts/SourceCodePro-Medium.ttf) format('truetype');
src: url('~custom-fonts/SourceCodePro-Medium.ttf') format('truetype');
font-weight: 300;
}

Expand Down
1 change: 1 addition & 0 deletions src/desktop/src/ui/views/onboarding/AccountName.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ class AccountName extends React.PureComponent {

this.props.setAccountInfoDuringSetup({
name: this.state.name,
completed: !Electron.getOnboardingGenerated() && accountNames.length > 0,
});

if (Electron.getOnboardingGenerated()) {
Expand Down
8 changes: 8 additions & 0 deletions src/desktop/src/ui/views/onboarding/AccountPassword.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { connect } from 'react-redux';
import { withI18n } from 'react-i18next';
import { zxcvbn } from 'libs/exports';

import { setAccountInfoDuringSetup } from 'actions/accounts';
import { generateAlert } from 'actions/alerts';
import { setPassword } from 'actions/wallet';

Expand Down Expand Up @@ -34,6 +35,8 @@ class AccountPassword extends React.PureComponent {
additionalAccountName: PropTypes.string.isRequired,
/** @ignore */
additionalAccountMeta: PropTypes.object.isRequired,
/** @ignore */
setAccountInfoDuringSetup: PropTypes.func.isRequired,
};

state = {
Expand Down Expand Up @@ -91,6 +94,10 @@ class AccountPassword extends React.PureComponent {
await setTwoFA(passwordHash, null);
setPassword(passwordHash);

this.props.setAccountInfoDuringSetup({
completed: true,
});

const seedStore = await new SeedStore[additionalAccountMeta.type](passwordHash);
await seedStore.addAccount(additionalAccountName, Electron.getOnboardingSeed());

Expand Down Expand Up @@ -161,6 +168,7 @@ const mapStateToProps = (state) => ({
const mapDispatchToProps = {
setPassword,
generateAlert,
setAccountInfoDuringSetup,
};

export default connect(mapStateToProps, mapDispatchToProps)(withI18n()(AccountPassword));
1 change: 1 addition & 0 deletions src/desktop/src/ui/views/onboarding/Index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class Onboarding extends React.PureComponent {
this.props.setAccountInfoDuringSetup({
name: '',
meta: {},
completed: false,
});

Electron.setOnboardingSeed(null);
Expand Down
4 changes: 2 additions & 2 deletions src/desktop/src/ui/views/onboarding/Login.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ class Login extends React.Component {
componentDidMount() {
Electron.updateMenu('authorised', false);

const { addingAdditionalAccount } = this.props;
const { password, addingAdditionalAccount } = this.props;

if (addingAdditionalAccount) {
if (password.length && addingAdditionalAccount) {
this.setupAccount();
} else {
this.props.clearWalletData();
Expand Down
2 changes: 1 addition & 1 deletion src/desktop/src/ui/views/onboarding/SeedSaveWrite.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class SeedSave extends PureComponent {
</div>
<div>
<Tooltip
title={t('saveYourSeed:whatIsChecksum')}
title={t('saveYourSeed:whatIsAChecksum')}
tip={t('saveYourSeed:checksumExplanation')}
/>{' '}
{t('checksum')}: <strong>{checksum}</strong>
Expand Down
10 changes: 9 additions & 1 deletion src/desktop/src/ui/views/onboarding/SeedVerify.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { withI18n } from 'react-i18next';
import { MAX_SEED_LENGTH } from 'libs/iota/utils';
import SeedStore from 'libs/SeedStore';

import { setAccountInfoDuringSetup } from 'actions/accounts';
import { generateAlert } from 'actions/alerts';

import Button from 'ui/components/Button';
Expand All @@ -17,6 +18,8 @@ import SeedInput from 'ui/components/input/Seed';
*/
class SeedVerify extends React.PureComponent {
static propTypes = {
/** @ignore */
setAccountInfoDuringSetup: PropTypes.func.isRequired,
/** @ignore */
wallet: PropTypes.object.isRequired,
/** @ignore */
Expand Down Expand Up @@ -58,7 +61,7 @@ class SeedVerify extends React.PureComponent {
e.preventDefault();
}

const { wallet, additionalAccountName, history, generateAlert, t } = this.props;
const { setAccountInfoDuringSetup, wallet, additionalAccountName, history, generateAlert, t } = this.props;
const { seed, isGenerated } = this.state;

if (
Expand Down Expand Up @@ -93,6 +96,10 @@ class SeedVerify extends React.PureComponent {
history.push('/onboarding/account-name');
} else {
if (wallet.ready) {
setAccountInfoDuringSetup({
completed: true,
});

const seedStore = await new SeedStore.keychain(wallet.password);
await seedStore.addAccount(additionalAccountName, Electron.getOnboardingSeed());

Expand Down Expand Up @@ -150,6 +157,7 @@ const mapStateToProps = (state) => ({

const mapDispatchToProps = {
generateAlert,
setAccountInfoDuringSetup,
};

export default connect(mapStateToProps, mapDispatchToProps)(withI18n()(SeedVerify));
6 changes: 1 addition & 5 deletions src/desktop/src/ui/views/settings/account/Name.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,7 @@ class AccountName extends PureComponent {
newAccountName,
});

const seedStore = await new SeedStore[account.accountMeta.type](
password,
account.accountName,
account.accountMeta,
);
const seedStore = await new SeedStore[account.meta.type](password, account.accountName, account.meta);
await seedStore.renameAccount(newAccountName);
}

Expand Down
2 changes: 1 addition & 1 deletion src/desktop/src/ui/views/settings/account/Remove.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Remove extends PureComponent {
});

try {
const seedStore = await new SeedStore[account.meta.type](password, account.meta, account.accountMeta);
const seedStore = await new SeedStore[account.meta.type](password, account.accountName, account.meta);
seedStore.removeAccount();

deleteAccount(account.accountName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ describe('Testing SetAccountName component', () => {
expect(props.setAccountInfoDuringSetup).toHaveBeenCalledWith({
name: 'foo',
meta: { type: 'keychain' },
completed: true,
});
});

Expand Down
2 changes: 1 addition & 1 deletion src/mobile/src/ui/components/Tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class Tabs extends Component {
);
return (
<View style={styles.container}>
<View style={[styles.tabBarBackground, { backgroundColor: bar.alt }]} />
<View style={[styles.tabBarBackground, { backgroundColor: bar.bg }]} />
<Animated.View
style={[
styles.activeTab,
Expand Down
2 changes: 1 addition & 1 deletion src/mobile/src/ui/components/TopBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ class TopBar extends Component {
style={[
styles.container,
{
backgroundColor: bar.alt,
backgroundColor: bar.bg,
},
]}
>
Expand Down
2 changes: 1 addition & 1 deletion src/mobile/src/ui/theme/general.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const Styling = {
export function getBackgroundColor(screen, theme, inactive = false) {
const { bar, body } = theme;
const screenMap = {
home: inactive ? body.bg : bar.alt,
home: inactive ? body.bg : bar.bg,
loading: body.bg,
newSeedSetup: body.bg,
walletSetup: body.bg,
Expand Down
1 change: 1 addition & 0 deletions src/mobile/src/ui/views/onboarding/SetAccountName.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ export class SetAccountName extends Component {
this.props.setAccountInfoDuringSetup({
name: accountName,
meta: { type: 'keychain' },
completed: true,
});

if (!onboardingComplete) {
Expand Down
2 changes: 1 addition & 1 deletion src/mobile/src/ui/views/wallet/Loading.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ class Loading extends Component {
orientation: ['portrait'],
},
statusBar: {
backgroundColor: bar.alt,
backgroundColor: bar.bg,
},
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/mobile/src/ui/views/wallet/ThemeCustomisation.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ class ThemeCustomisation extends Component {
{t('themeCustomisation:mockup').toUpperCase()}
</Text>
</View>
<View style={[styles.frameBar, { backgroundColor: bar.alt }]}>
<View style={[styles.frameBar, { backgroundColor: bar.bg }]}>
<Text style={[styles.frameBarTitle, { color: bar.color }]}>
{t('global:mainWallet').toUpperCase()}
</Text>
Expand Down
2 changes: 1 addition & 1 deletion src/mobile/src/ui/views/wallet/TwoFactorSetupEnterToken.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class TwoFactorSetupEnterToken extends Component {
orientation: ['portrait'],
},
statusBar: {
backgroundColor: bar.alt,
backgroundColor: bar.bg,
},
});
}
Expand Down
Loading

0 comments on commit 79214b8

Please sign in to comment.