Skip to content

Commit

Permalink
Merge branch 'release-1.26.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
reyraa committed Apr 30, 2020
2 parents 58ca5a6 + 2c48555 commit 6f8f807
Show file tree
Hide file tree
Showing 247 changed files with 7,867 additions and 6,235 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ storybook-static
.env

## Commercial fonts
src/assets/fonts/basier-circle/*
src/assets/fonts/gilroy/*
src/assets/fonts/basier-circle/
src/assets/fonts/gilroy/
8 changes: 2 additions & 6 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,8 @@ pipeline {
withCredentials([string(credentialsId: 'github-lisk-token', variable: 'GH_TOKEN')]) {
nvm(getNodejsVersion()) {
sh '''
if stat /home/lisk/fonts/basier-circle/* > /dev/null ; then
cp /home/lisk/fonts/basier-circle/* src/assets/fonts/basier-circle/
fi
if stat /home/lisk/fonts/gilroy/* > /dev/null ; then
cp /home/lisk/fonts/gilroy/* src/assets/fonts/gilroy/
fi
cp -R /home/lisk/fonts/basier-circle src/assets/fonts
cp -R /home/lisk/fonts/gilroy src/assets/fonts
npm run --silent build
npm run --silent build:testnet
Expand Down
102 changes: 76 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,81 +9,99 @@
[![devDependencies Status](https://david-dm.org/liskHQ/lisk-desktop/dev-status.svg)](https://david-dm.org/liskHQ/lisk-desktop?type=dev)

## For Contributors
Please see [CONTRIBUTING.md](/CONTRIBUTING.md) for more information.
Please see [CONTRIBUTING_GUIDE.md](/docs/CONTRIBUTING_GUIDE.md) for more information.

## Development

### Using Commercial Fonts
`Basier Circle` and `Gilroy` used in the production version are commercial fonts. This repository only contains open fonts and uses `Open Sans` as a replacement for the commercial ones.

If you have licensed copies of `Basier Circle` and `Gilroy`, you can add them to [fonts folder](./src/assets/fonts). If you don't have the fonts, you need to remove lines 25 - 81 of [type.css](./src/components/app/type.css). After that, the `build` and `dev` npm scripts run without any errors.

### Setup environemnt

```
git clone https://github.com/LiskHQ/lisk-desktop.git
cd lisk-desktop
npm install
npm run dev
```

### Run on browser

Open http://localhost:8080

For ease of development, you can set the following query string to see network options in login page:
```
http://localhost:8080/#/?showNetwork=true
```

If you are actively developing in a specific route, and want to be autologged in everytime you reload the page, please add the following to localStorage:
If you are actively developing in a specific route, and want to be automatically signed in every time you reload the page, please add the following input pairs to your localStorage:

_loginKey_: _a valid passphrase_

Add the above pair using the storage tab in your dev tools or via JavaScript command:

```
localStorage.setItem('liskCoreUrl', 'http://localhost:4000') // desired node to log in into
localStorage.setItem('loginKey', 'wagon stock borrow episode laundry kitten salute link globe zero feed marble') // desired account passphrase
```

When developing with hardware wallet, this will log you into to first account on the first connected hardware wallet:

When developing with hardware wallet, this will sign you in using the first account on the first connected hardware wallet:
```
localStorage.setItem('liskCoreUrl', 'http://localhost:4000') // desired node to log in into
localStorage.setItem('hwWalletAutoLogin', true);
```

#### Build
You can use the same approach to define a desired network to which Lisk Desktop connects:

```
npm run build
localStorage.setItem('liskCoreUrl', 'http://localhost:4000') // desired node to log in into
```

#### Using Commercial Fonts
Since some of the fonts used in the production version are commercial, this repository only contains open source fonts and uses `Open Sans` as a replacement for the commercial ones.

If you have licensed copies of `Basier Circle` and `Gilroy`, you can add them to [fonts folder](./src/assets/fonts) to replace the empty files that are there so that webpack build doesn't fail if the fonts are not present.

## Electron
### Build

#### Start
#### Production build


Start the Electron client. Before staring you need to make sure the application is built. If you need to build the entire application, run
To build the project simply run

```
npm run build
```
Under the hood, this script runs

as mentioned before. And if you want to solely build electron app, run
```
npm run build-prod
```
to build the React app under `src/` and

```
npm run build-electron
```
to build the electron app under `app/` using webpack. You can run the above scripts individually if you're looking to see the changes solely on one of the two said applications.

Then, in order to launch electron, you can run

### Run Electron
If you have already built the application as described above, you can launch Electron using

```
npm run start
```

Then, in order to launch version with hardware wallet, you can run
#### Run with parameters

To launch a version which supports hardware wallets, you can run

```
npm run dev-hardware-wallet
```

In order to launch electron that gets live updates from already running webpack-dev-server on port 8080 and with react/redux dev tools, you can run
or to launch electron and receive live updates from already running `webpack-dev-server` on port `8080` and you can run

```
LISK_HUB_URL="http://localhost:8080" DEBUG=true npm run start
```
This comes with Redux dev tools.

### Distribution

#### Windows

Expand All @@ -109,7 +127,9 @@ Build package for Linux (on Linux).
npm run pack
```

## Run unit tests
## Testing

### Unit tests

#### Single run
```
Expand All @@ -121,12 +141,12 @@ npm run test
npm run test-live
```

## Run end-to-end tests
### E2E tests
In order to run e2e tests you need to install [lisk-core](https://github.com/LiskHQ/lisk)

#### Setup core

Setup a lisk test node as described in [https://github.com/LiskHQ/lisk#tests](https://github.com/LiskHQ/lisk#tests)
Setup a lisk test node as described in Preparing Node headline under [the tests section of Lisk Framework README](https://github.com/LiskHQ/lisk-sdk/tree/development/framework).

Run lisk test node with [pm2](http://pm2.keymetrics.io/) on `localhost:4000`

Expand All @@ -149,7 +169,7 @@ Run e2e tests
npm run cypress:run
```

## Launch React Storybook
### React Storybook

To launch storybook sandbox with components run
```
Expand All @@ -159,6 +179,37 @@ and navigate to

http://localhost:6006/

## Directory Layout

```
├── __mocks__/ # Modules used to mock dependencies for testing purpose.
├── .storybook/ # React storybooks reside here.
├── app/ # Electron based application that launces the react app.
├── build/ # Build specific materials.
├── config/ # Automation scripts (Webpack configurations, i18n scanner, etc)
├── coverage/ # Results of Jest test coverage.
├── dist/ # Platform specific built outputs.
├── docs/ # Project documentations such as contribution guides and development guidelines.
├── i18n/ # Localization files inluding setup scripts and translation json files.
├── libs/ # Modules which can be consumed individually in other projects.
├── node_modules/ # 3rd-party libraries and utilities.
├── src/ # Application source code.
│ ├── actions/ # Store actions reside here and are broken into script files dedicated to each system entity.
│ ├── app/ # The bootstrap React application
│ ├── assets/ # Static files (images, fonts, etc)
│ ├── components/ # React presentational components are located here.
│ │ ├── screens/ # These are the component that represent screens with dedicated URL.
│ │ ├── shared/ # These are the React components used at least in 2 other components (calendar, liskAmount, etc)
│ │ └── toolbox/ # Basic elements with basic styles and functionality which are used in numerous places (button, input, etc)
│ ├── constants/ # Names, addresses, static configurations and other values used throughout the application
│ ├── context/ # React context configuration files
│ ├── hooks/ # React custom hooks
│ ├── store/ # Redux store resides here.
│ │ ├── middlewares/ # All the Redux middlewares are places here and have their dedicated script files based on the system entities.
│ │ ├── reducers/ # Redux reducers are located here. similar to actions and reducers, they are placed in script files named after the entity they represent.
│ ├── utils/ # Utility functions
└──test/ # E2E tests written with Cypress.io and Cucumber; also some helpers used by unit test that live in /src
```


## Contributors
Expand All @@ -173,4 +224,3 @@ This program is free software: you can redistribute it and/or modify it under th
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the [GNU General Public License](https://github.com/LiskHQ/lisk-desktop/tree/master/LICENSE) along with this program. If not, see <http://www.gnu.org/licenses/>.

2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lisk-desktop",
"version": "1.25.0",
"version": "1.26.0-beta.0",
"productName": "Lisk",
"description": "Lisk",
"main": "./build/main.js",
Expand Down
3 changes: 2 additions & 1 deletion app/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import './modules/hwManager';

i18nSetup();

const defaultServerPort = 3000;
const defaultServerPort = 5659;
let serverUrl;
const startServer = () => getPort({ port: defaultServerPort })
.then((port) => {
Expand Down Expand Up @@ -96,6 +96,7 @@ app.on('will-finish-launching', () => {
// Protocol handler for MacOS
app.on('open-url', (event, url) => {
event.preventDefault();
win.browser.show();
win.send({ event: 'openUrl', value: url });
});
});
Expand Down
18 changes: 9 additions & 9 deletions i18n/locales/de/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"2nd passphrase registration submitted": "Registrierung der zweiten Passphrase gesendet",
"64 bytes left": "64 Bytes übrig",
"A bit more. Make sure to type at least 3 characters.": "Noch ein bisschen. Achte darauf, dass du mindestens 3 Zeichen eingibst. ",
"A great way to start is to top up your account with some {{value}} tokens.": "Beginne, in dem du dein Konto mit einigen {{value}} Tokens auflädst.",
"A great way to start is to top up your account with some {{value}}.": "Beginne, in dem du dein Konto mit einigen {{value}} auflädst.",
"About": "Über Lisk",
"Accept": "Akzeptieren",
"Access your account by scanning the QR code below with the Lisk Mobile App:": "Um auf dein Konto zuzugreifen, scanne den untenstehenden QR-Code mit der Lisk Mobile App:",
Expand Down Expand Up @@ -103,7 +103,7 @@
"Copy address": "Kopiere Adresse",
"Copy entire passphrase": "Gesamte Passphrase kopieren",
"Copy link": "Kopiere Link",
"Copy the address or scan the QR code, to easily request BTC tokens from Lisk or Lisk Mobile users.": "Kopiere die Adresse oder scanne den QR-Code um BTC Tokens von Lisk oder Lisk Mobile Nutzern einfach anzufragen.",
"Copy the address or scan the QR code, to easily request BTC from Lisk or Lisk Mobile users.": "Kopiere die Adresse oder scanne den QR-Code um BTC von Lisk oder Lisk Mobile Nutzern einfach anzufragen.",
"Copy to clipboard": "In Zwischenablage kopieren",
"Create an account": "Konto erstellen",
"Create it now": "Jetzt erstellen",
Expand Down Expand Up @@ -143,7 +143,7 @@
"Don’t have a Lisk account yet? ": "Noch keinen Lisk account? ",
"Download": "Herunterladen",
"Download started!": "Herunterladen gestartet!",
"Each LSK is worth one vote.": "Jeder LSK Token ist eine Stimme wert.",
"Each LSK is worth one vote.": "Jeder LSK ist eine Stimme wert.",
"Each time you add or remove a vote it is counted as an action. There's {{fee}} LSK fee per every 33 actions.": "Jedes Mal wenn du eine Stimme hinzufügst oder entfernst zählt das als eine Aktion. Die Gebühr für 33 Aktionen beträgt {{fee}} LSK.",
"Edit": "Bearbeiten",
"Edit bookmark": "Lesezeichen bearbeiten",
Expand Down Expand Up @@ -243,7 +243,7 @@
"Lisk currently supports Ledger Nano S, Ledger Nano X, Trezor One and Trezor Model T wallets": "Lisk unterstützt momentan Ledger Nano S, Ledger Nano X, Trezor One und Trezor Model T Wallets",
"Lisk {{version}}": "Lisk {{Version}}",
"Lisk {{version}} is here!": "Lisk {{Version}} is da!",
"Lisk's blockchain is based on the Delegated Proof of Stake (DPoS) consensus algorithm, in which 101 delegates are voted in by token holders to secure the network.": "Die Blockchain von Lisk basiert auf dem Konsensalgorithmus des Delegated Proof of Stake (DPoS), bei dem 101 Delegierte von Token-Inhabern zur Sicherung des Netzwerks gewählt werden.",
"Lisk's blockchain is based on the Delegated Proof of Stake (DPoS) consensus algorithm, in which 101 delegates are voted in by LSK holders to secure the network.": "Die Blockchain von Lisk basiert auf dem Konsensalgorithmus des Delegated Proof of Stake (DPoS), bei dem 101 Delegierte von LSK-Inhabern zur Sicherung des Netzwerks gewählt werden.",
"Load more": "Mehr laden",
"Loading": "Laden",
"Loading name...": "Ladenname",
Expand Down Expand Up @@ -383,7 +383,7 @@
"Send {{amount}} {{token}}": "Senden {{amount}} {{token}}",
"Send {{token}}": "Senden {{token}}",
"Send {{token}} to this Account ": "{{token}} an dieses Konto senden",
"Send, request and receive LSK tokens in one place! You can even attach personal message to each outgoing transaction.": "Senden, Anfordern und Empfangen von LSK-Token an einem Ort! Du kanst sogar jeder ausgehenden Transaktion eine persönliche Nachricht anhängen.",
"Send, request and receive LSK in one place! You can even attach personal message to each outgoing transaction.": "Senden, Anfordern und Empfangen von LSK an einem Ort! Du kanst sogar jeder ausgehenden Transaktion eine persönliche Nachricht anhängen.",
"Sender": "Absender",
"Session timeout": "Session-Timeout",
"Settings": "Einstellungen",
Expand Down Expand Up @@ -424,9 +424,9 @@
"The message can't contain whitespace at the beginning or end.": "Die Nachricht darf keine Leerzeichen am Anfang oder am Ende beinhalten.",
"The signature is correct": "Die Signatur ist korrekt",
"The signature is incorrect": "Die Signatur ist inkorrekt",
"The top 101 delegates are able to forge new blocks and recieve forging rewards.": "Die top 101 Delegierten können neue Blöcke forgen und erhalten dafür Blockvergütungen.",
"The top 101 delegates are able to forge new blocks and receive forging rewards.": "Die top 101 Delegierten können neue Blöcke forgen und erhalten dafür Blockvergütungen.",
"The transaction has been canceled on your {{model}}": "Die Transaktion auf deinem {{model}} wurde abgebrochen",
"The ultimate gateway to the ecosystem. Lisk’s new design lets you easily manage your tokens (and much, much more).": "Das ultimative Portal zum Lisk Ökosystem. Lisk's neues Design lässt dich deine Tokens mit Leichtigkeit verwalten (und viel, viel mehr).",
"The ultimate gateway to the ecosystem. Lisk’s new design lets you easily manage your LSK (and much, much more).": "Das ultimative Portal zum Lisk Ökosystem. Lisk's neues Design lässt dich deine LSK mit Leichtigkeit verwalten (und viel, viel mehr).",
"The {{inputLabel}} can't be empty": "Das {{inputLabel}} darf nicht leer sein",
"There are no results matching this filter.": "Es gibt keine Ergebnisse für diesen Filter.",
"There are no transactions for this block.": "Es gibt keine Transaktionen in diesem Block.",
Expand Down Expand Up @@ -512,7 +512,7 @@
"You are disconnected": "Du bist nicht verbunden",
"You can also download, print and store safely your passphrase.": "Du kannst die Passphrase auch downloaden oder ausdrucken, und sie an einem sicheren Ort aufbewahren.",
"You can learn more in our": "Lerne mehr darüber in unserer",
"You can now start sending and receiving LSK tokens": "Nun kannst du LSK tokens senden und empfangen.",
"You can now start sending and receiving LSK": "Nun kannst du LSK senden und empfangen.",
"You can share your Lisk ID with anyone you wish, but never reveal your passphrase to anyone as it would allow full access to your account.": "Du kannst deine Lisk ID an jeden weitergeben, aber deine Passphrase solltest du auf keinen Fall weitergeben da sie volle Kontrolle über dein Konto erlaubt. ",
"You can use your passphrase to sign a message. This signed message can prove that you are the owner of the account, since only your passphrase can produce it. We recommend including date & time or a specific keyword.": "Benutze deine Passphrase, um eine Nachricht zu signieren. Die signierte Nachricht kann beweisen, dass du den Account besitzt, da nur deine Passphrase diese Signatur erstellen kann. Wir empfehlen Zeit und Datum, oder ein spezifisches Schlüsselwort hinzuzufügen.",
"You don’t have any bookmarks yet.": "Du hast noch keine Lesezeichen.",
Expand Down Expand Up @@ -557,7 +557,7 @@
"Empty": "Leer",
"Last {{num}} blocks": "Die letzten {{num}} Blöcke",
"Not Empty": "Nicht leer",
"Send, request and manage your LSK tokens.": "Senden, Anfordern und Verwalten Ihrer LSK-Token.",
"Send, request and manage your LSK.": "Senden, Anfordern und Verwalten Ihrer LSK.",
"Size": "Größe",
"Vote for who secures the network or becomes a delegate.": "Stimmen Sie ab, wer das Netzwerk sichert oder wird Delegierter.",
"unknown": "unbekannt",
Expand Down
Loading

0 comments on commit 6f8f807

Please sign in to comment.