Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Commit

Permalink
Merge branch 'development' into 787-open-url-listener
Browse files Browse the repository at this point in the history
  • Loading branch information
reyraa committed Sep 29, 2017
2 parents 9738de3 + a7b94ee commit 671f199
Show file tree
Hide file tree
Showing 92 changed files with 675 additions and 386 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Lisk Nano

[![Greenkeeper badge](https://badges.greenkeeper.io/LiskHQ/lisk-nano.svg)](https://greenkeeper.io/)

[![Build Status](https://jenkins.lisk.io/buildStatus/icon?job=lisk-nano/development)](https://jenkins.lisk.io/job/lisk-nano/job/development)
[![Coverage Status](https://coveralls.io/repos/github/LiskHQ/lisk-nano/badge.svg?branch=development)](https://coveralls.io/github/LiskHQ/lisk-nano?branch=development)
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](http://www.gnu.org/licenses/gpl-3.0)
Expand Down
121 changes: 64 additions & 57 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,105 +29,105 @@
"url": "https://github.com/LiskHQ/lisk-nano"
},
"dependencies": {
"bignumber.js": "=4.0.0",
"bitcore-mnemonic": "=1.1.1",
"copy-to-clipboard": "=3.0.6",
"bignumber.js": "4.0.4",
"bitcore-mnemonic": "1.2.5",
"copy-to-clipboard": "3.0.8",
"flexboxgrid": "=6.3.1",
"history": "^4.7.2",
"i18next": "^9.0.0",
"i18next-localstorage-cache": "^1.1.1",
"i18next-xhr-backend": "^1.4.2",
"lisk-js": "=0.4.5",
"moment": "=2.15.1",
"lisk-js": "0.5.0",
"moment": "2.18.1",
"numeral": "=2.0.6",
"postcss": "=6.0.2",
"postcss-cssnext": "=2.11.0",
"postcss": "6.0.12",
"postcss-cssnext": "2.11.0",
"prop-types": "=15.5.10",
"qrcode.react": "=0.7.1",
"react": "=15.6.x",
"react-animate-on-change": "^1.0.0",
"react-circular-progressbar": "=0.1.5",
"react-circular-progressbar": "0.2.1",
"react-css-themr": "=2.1.2",
"react-dom": "=15.6.x",
"react-i18next": "^5.2.0",
"react-redux": "=5.0.5",
"react-router": "=4.1.2",
"react-router-dom": "=4.1.2",
"react-redux": "5.0.6",
"react-router": "4.2.0",
"react-router-dom": "4.2.2",
"react-toolbox": "=2.0.0-beta.12",
"react-waypoint": "=7.0.4",
"redux": "=3.6.0",
"react-waypoint": "7.1.0",
"redux": "3.7.2",
"redux-logger": "=3.0.6",
"redux-thunk": "^2.2.0"
},
"devDependencies": {
"@storybook/addon-actions": "=3.2.0",
"@storybook/react": "=3.1.8",
"babel-core": "=6.20.0",
"babel-loader": "=7.0.0-beta.1",
"babel-plugin-istanbul": "=4.1.4",
"@storybook/addon-actions": "3.2.10",
"@storybook/react": "3.2.10",
"babel-core": "6.26.0",
"babel-loader": "7.1.2",
"babel-plugin-istanbul": "4.1.5",
"babel-plugin-syntax-trailing-function-commas": "=6.22.0",
"babel-preset-es2015": "=6.18.0",
"babel-preset-react": "=6.16.0",
"babel-preset-es2015": "6.24.1",
"babel-preset-react": "6.24.1",
"babel-preset-stage-3": "=6.24.1",
"chai": "=3.5.0",
"chai-as-promised": "=6.0.0",
"chai-enzyme": "=0.6.1",
"chai": "4.1.2",
"chai-as-promised": "7.1.1",
"chai-enzyme": "0.8.0",
"css-hot-loader": "=1.3.1",
"css-loader": "=0.28.0",
"cucumber": "=2.2.0",
"del-cli": "=0.2.1",
"electron": "=1.6.2",
"electron-builder": "=16.8.3",
"enzyme": "=2.8.2",
"eslint": "=4.7.2",
"eslint-config-airbnb": "=15.1.0",
"eslint-config-google": "=0.7.1",
"eslint-loader": "=1.7.1",
"eslint-plugin-html": "=2.0.3",
"eslint-plugin-import": "=2.2.0",
"eslint-plugin-react": "=6.10.3",
"exports-loader": "=0.6.3",
"extract-text-webpack-plugin": "=2.1.2",
"file-loader": "=0.9.0",
"css-loader": "0.28.7",
"cucumber": "2.2.0",
"del-cli": "1.1.0",
"electron": "1.7.8",
"electron-builder": "19.30.2",
"enzyme": "2.9.1",
"eslint": "4.7.2",
"eslint-config-airbnb": "15.1.0",
"eslint-config-google": "0.9.1",
"eslint-loader": "1.9.0",
"eslint-plugin-html": "3.2.2",
"eslint-plugin-import": "2.7.0",
"eslint-plugin-react": "7.4.0",
"exports-loader": "0.6.4",
"extract-text-webpack-plugin": "3.0.0",
"file-loader": "0.11.2",
"glob": "=7.1.2",
"i18next-scanner": "=2.0.0",
"imports-loader": "=0.6.5",
"imports-loader": "0.7.1",
"js-nacl": "=1.2.2",
"json-loader": "=0.5.4",
"karma": "=1.7.0",
"json-loader": "0.5.7",
"karma": "1.7.1",
"karma-chai": "=0.1.0",
"karma-chrome-launcher": "=2.2.0",
"karma-coverage": "=1.1.1",
"karma-jenkins-reporter": "0.0.2",
"karma-mocha": "=1.3.0",
"karma-mocha-reporter": "=2.2.3",
"karma-mocha-reporter": "2.2.4",
"karma-sourcemap-loader": "=0.3.7",
"karma-verbose-reporter": "=0.0.6",
"karma-webpack": "=2.0.3",
"mocha": "=3.2.0",
"karma-webpack": "2.0.4",
"mocha": "3.5.3",
"postcss-for": "=2.1.1",
"postcss-loader": "=2.0.6",
"postcss-partial-import": "=4.1.0",
"postcss-reporter": "=4.0.0",
"protractor": "=5.1.1",
"protractor-cucumber-framework": "=3.1.0",
"postcss-reporter": "5.0.0",
"protractor": "5.1.2",
"protractor-cucumber-framework": "3.1.0",
"raw-loader": "=0.5.1",
"react-addons-test-utils": "=15.6.0",
"react-hot-loader": "^1.3.1",
"react-test-renderer": "=15.6.1",
"redux-mock-store": "=1.2.3",
"should": "=11.2.0",
"sinon": "=2.0.0",
"sinon-chai": "=2.8.0",
"redux-mock-store": "1.3.0",
"should": "13.1.0",
"sinon": "3.3.0",
"sinon-chai": "2.13.0",
"sinon-stub-promise": "^4.0.0",
"style-loader": "=0.16.1",
"style-loader": "0.18.2",
"stylelint": "^8.0.0",
"stylelint-config-standard": "^17.0.0",
"stylelint-webpack-plugin": "^0.9.0",
"url-loader": "=0.5.7",
"webpack": "=2.2.1",
"webpack-bundle-analyzer": "=2.4.0",
"webpack-dev-server": "=2.4.2"
"url-loader": "0.5.9",
"webpack": "3.6.0",
"webpack-bundle-analyzer": "2.9.0",
"webpack-dev-server": "2.8.2"
},
"build": {
"appId": "io.lisk.nano",
Expand All @@ -148,5 +148,12 @@
"win": {
"target": "nsis"
}
},
"greenkeeper": {
"ignore": [
"cucumber",
"protractor-cucumber-framework",
"postcss-cssnext"
]
}
}
7 changes: 4 additions & 3 deletions src/actions/account.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { transactionAdded } from './transactions';
import { errorAlertDialogDisplayed } from './dialog';
import Fees from '../constants/fees';
import { toRawLsk } from '../utils/lsk';
import transactionTypes from '../constants/transactionTypes';

/**
* Trigger this action to update the account object
Expand Down Expand Up @@ -58,7 +59,7 @@ export const secondPassphraseRegistered = ({ activePeer, secondPassphrase, accou
senderId: account.address,
amount: 0,
fee: Fees.setSecondPassphrase,
type: 1,
type: transactionTypes.setSecondPassphrase,
}));
}).catch((error) => {
const text = (error && error.message) ? error.message : 'An error occurred while registering your second passphrase. Please try again.';
Expand All @@ -83,7 +84,7 @@ export const delegateRegistered = ({
username,
amount: 0,
fee: Fees.registerDelegate,
type: 2,
type: transactionTypes.registerDelegate,
}));
})
.catch((error) => {
Expand All @@ -108,7 +109,7 @@ export const sent = ({ activePeer, account, recipientId, amount, passphrase, sec
recipientId,
amount: toRawLsk(amount),
fee: Fees.send,
type: 0,
type: transactionTypes.send,
}));
})
.catch((error) => {
Expand Down
7 changes: 4 additions & 3 deletions src/actions/account.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import * as accountApi from '../utils/api/account';
import * as delegateApi from '../utils/api/delegate';
import Fees from '../constants/fees';
import { toRawLsk } from '../utils/lsk';
import transactionTypes from '../constants/transactionTypes';

describe('actions: account', () => {
describe('accountUpdated', () => {
Expand Down Expand Up @@ -69,7 +70,7 @@ describe('actions: account', () => {
senderId: 'test_address',
amount: 0,
fee: Fees.setSecondPassphrase,
type: 1,
type: transactionTypes.setSecondPassphrase,
};

actionFunction(dispatch);
Expand Down Expand Up @@ -129,7 +130,7 @@ describe('actions: account', () => {
username: data.username,
amount: 0,
fee: Fees.registerDelegate,
type: 2,
type: transactionTypes.registerDelegate,
};

actionFunction(dispatch);
Expand Down Expand Up @@ -191,7 +192,7 @@ describe('actions: account', () => {
recipientId: data.recipientId,
amount: toRawLsk(data.amount),
fee: Fees.send,
type: 0,
type: transactionTypes.send,
};

actionFunction(dispatch);
Expand Down
7 changes: 4 additions & 3 deletions src/actions/dialog.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import actionTypes from '../constants/actions';
import i18next from 'i18next';
import Alert from '../components/dialog/alert';
import actionTypes from '../constants/actions';

/**
* An action to dispatch to display a dialog
Expand Down Expand Up @@ -28,7 +29,7 @@ export const alertDialogDisplayed = data => dialogDisplayed({
*
*/
export const successAlertDialogDisplayed = data => alertDialogDisplayed({
title: 'Success',
title: i18next.t('Success'),
text: data.text,
type: 'success',
});
Expand All @@ -38,7 +39,7 @@ export const successAlertDialogDisplayed = data => alertDialogDisplayed({
*
*/
export const errorAlertDialogDisplayed = data => alertDialogDisplayed({
title: 'Error',
title: i18next.t('Error'),
text: data.text,
type: 'error',
});
Expand Down
3 changes: 2 additions & 1 deletion src/actions/voting.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { errorAlertDialogDisplayed } from './dialog';
import { passphraseUsed } from './account';
import actionTypes from '../constants/actions';
import Fees from '../constants/fees';
import transactionTypes from '../constants/transactionTypes';

/**
* Add pending variable to the list of voted delegates and list of unvoted delegates
Expand Down Expand Up @@ -82,7 +83,7 @@ export const votePlaced = ({ activePeer, passphrase, account, votes, secondSecre
senderId: account.address,
amount: 0,
fee: Fees.vote,
type: 3,
type: transactionTypes.vote,
}));
}).catch((error) => {
const text = error && error.message ? `${error.message}.` : 'An error occurred while placing your vote.';
Expand Down
2 changes: 1 addition & 1 deletion src/components/account/account.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const Account = ({
<LiskAmount val={account.balance} /> LSK
</p>
<p className="inner secondary tooltip">
Click to send all funds
{t('Click to send all funds')}
</p>
</div>
</ClickToSend>
Expand Down
5 changes: 3 additions & 2 deletions src/components/account/account.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from 'react';
import { expect } from 'chai';
import sinon from 'sinon';
import { shallow } from 'enzyme';
import sinon from 'sinon';
import i18n from '../../i18n';
import store from '../../store';
import Account from './account';
import ClickToSend from '../clickToSend';
Expand Down Expand Up @@ -50,7 +51,7 @@ describe('Account', () => {

it('should render balance with ClickToSend component', () => {
const wrapper = shallow(<Account {...props} />, {
context: { store },
context: { store, i18n },
childContextTypes: {
},
});
Expand Down
6 changes: 3 additions & 3 deletions src/components/account/address.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import styles from './account.css';

const getStatusTooltip = (props) => {
if (props.secondSignature) {
return 'This account is protected by a second passphrase';
return props.t('This account is protected by a second passphrase');
} else if (props.passphrase) {
return 'Passphrase of the acount is saved till the end of the session.';
return props.t('Passphrase of the account is saved till the end of the session.');
}
return 'Passphrase of the acount will be required to perform any transaction.';
return props.t('Passphrase of the account will be required to perform any transaction.');
};

const Address = (props) => {
Expand Down
12 changes: 7 additions & 5 deletions src/components/actionBar/index.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
import React from 'react';
import { translate } from 'react-i18next';
import Button from 'react-toolbox/lib/button';
import React from 'react';
import grid from 'flexboxgrid/dist/flexboxgrid.css';
import PricedButton from '../pricedButton';
import styles from './actionBar.css';

const ActionBar = ({
secondaryButton, primaryButton, account,
export const ActionBarRaw = ({
secondaryButton, primaryButton, account, t,
}) => (
<section className={`${grid.row} ${grid['between-xs']} ${styles.wrapper}`} >
<Button
label={secondaryButton.label || 'Cancel'}
label={secondaryButton.label || t('Cancel')}
className={secondaryButton.className || 'cancel-button'}
onClick={secondaryButton.onClick}
type={secondaryButton.type || 'button'} />

<PricedButton
t={t}
primary={true}
raised={true}
label={primaryButton.label}
Expand All @@ -27,4 +29,4 @@ const ActionBar = ({
</section>
);

export default ActionBar;
export default translate()(ActionBarRaw);

0 comments on commit 671f199

Please sign in to comment.