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

Commit 77177fa

Browse files
author
Oliver Beddows
committed
Merge branch 'development' into 62_send-all
2 parents dea854b + 324af62 commit 77177fa

13 files changed

Lines changed: 739 additions & 29 deletions

File tree

LICENSE

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
[![Build Status](https://travis-ci.org/LiskHQ/lisk-nano.svg?branch=development)](https://travis-ci.org/LiskHQ/lisk-nano)
44
[![Coverage Status](https://coveralls.io/repos/github/LiskHQ/lisk-nano/badge.svg?branch=development)](https://coveralls.io/github/LiskHQ/lisk-nano?branch=development)
5+
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](http://www.gnu.org/licenses/gpl-3.0)
56

67
## Development
78

@@ -109,15 +110,30 @@ npm run e2e-test
109110

110111
## Authors
111112

112-
Ricardo Ferro <ricardo@lisk.io>
113+
- Ricardo Ferro <ricardo.ferro@gmail.com>
114+
- Oliver Beddows <oliver@lightcurve.io>
115+
- Vít Stanislav <vit@lightcurve.io>
116+
- Tobias Schwarz <tobias@lightcurve.io>
117+
- Ali Haghighatkhah <ali@lightcurve.io>
113118

114119
## License
115120

116-
The MIT License (MIT)
121+
Copyright © 2016-2017 Lisk Foundation
117122

118-
Copyright (c) 2016-2017 Lisk
123+
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
119124

120-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
125+
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.
126+
127+
You should have received a copy of the [GNU General Public License](https://github.com/LiskHQ/lisk-nano/tree/master/LICENSE) along with this program. If not, see <http://www.gnu.org/licenses/>.
128+
129+
***
130+
131+
This program also incorporates work previously released with lisk-nano `0.1.2` (and earlier) versions under the [MIT License](https://opensource.org/licenses/MIT). To comply with the requirements of that license, the following permission notice, applicable to those parts of the code only, is included below:
132+
133+
Copyright © 2016-2017 Lisk Foundation
134+
Copyright © 2015 Crypti
135+
136+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
121137

122138
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
123139

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
"dist:osx": "build --osx",
1212
"dist:linux": "build --linux"
1313
},
14+
"author": "Lisk Foundation <admin@lisk.io>, lightcurve GmbH <admin@lightcurve.io>",
15+
"license": "GPL-3.0",
1416
"repository": {
1517
"type": "git",
1618
"url": "https://github.com/LiskHQ/lisk-nano"

src/app/components/login/login.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ app.component('login', {
192192
}
193193

194194
// istanbul ignore next
195-
// lets consider this to be third party code that we don't want to test
195+
// Let's consider this to be third party code that we don't want to test
196196
static mobileAndTabletcheck() {
197197
let check = false
198198
;(function (a) { if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd(m|p|t)|hei|hi(pt|ta)|hp( i|ip)|hsc|ht(c(| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i(20|go|ma)|i230|iac( ||\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|[a-w])|libw|lynx|m1w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|mcr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|([1-8]|c))|phil|pire|pl(ay|uc)|pn2|po(ck|rt|se)|prox|psio|ptg|qaa|qc(07|12|21|32|60|[2-7]|i)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h|oo|p)|sdk\/|se(c(|0|1)|47|mc|nd|ri)|sgh|shar|sie(|m)|sk0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h|v|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl|tdg|tel(i|m)|tim|tmo|to(pl|sh)|ts(70|m|m3|m5)|tx9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas|your|zeto|zte/i.test(a.substr(0, 4))) check = true; }(navigator.userAgent || navigator.vendor || window.opera));

src/app/components/top/top.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@ app.component('top', {
66
account: '<',
77
},
88
controller: class top {
9-
constructor($peers) {
9+
constructor($peers, $scope) {
1010
this.$peers = $peers;
11+
12+
$scope.$watch('$ctrl.$peers.currentPeerConfig', () => {
13+
this.$peers.setActive(this.$peers.currentPeerConfig);
14+
});
1115
}
1216
},
1317
});

src/app/components/top/top.pug

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ md-content(layout='column', layout-gt-xs='row')
99
i.material-icons.offline(ng-show='!$ctrl.$peers.online') error
1010
i.material-icons.online(ng-show='$ctrl.$peers.online') check circle
1111
span.md-title.title Peer
12-
md-select(ng-model='$ctrl.$peers.active.currentPeer', aria-label='Peer')
12+
md-select(ng-model='$ctrl.$peers.currentPeerConfig', aria-label='Peer')
1313
md-optgroup(ng-repeat='(name, peers) in $ctrl.$peers.stack', ng-if='peers.length', label='{{ name }}')
14-
md-option(ng-repeat='peer in peers', ng-value='peer') {{ peer }}
14+
md-option(ng-repeat='peer in peers', ng-value='peer') {{ peer.node }}{{ peer.port ? ':' + peer.port : '' }}
1515
md-card.offline-hide(flex-gt-xs=33)
1616
md-card-content(layout='column', layout-align='center center')
1717
span.md-title.title Balance

src/app/services/peers/peers.js

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,36 @@ app.factory('$peers', ($timeout, $cookies, $location, $q) => {
1616
}
1717
}
1818

19-
setActive() {
19+
setActive(peerConf) {
2020
const peerStack = $location.search().peerStack || $cookies.get('peerStack') || 'official';
21-
const conf = { };
22-
if (peerStack === 'localhost') {
23-
conf.node = 'localhost';
24-
conf.port = 4000;
25-
conf.testnet = true;
26-
conf.nethash = '198f2b61a8eb95fbeed58b8216780b68f697f26b849acf00c8c93bb9b24f783d';
27-
} else if (peerStack === 'testnet') {
21+
let conf = peerConf || { };
22+
const localhostConf = {
23+
node: 'localhost',
24+
port: 4000,
25+
testnet: true,
26+
nethash: '198f2b61a8eb95fbeed58b8216780b68f697f26b849acf00c8c93bb9b24f783d',
27+
};
28+
if (peerStack === 'localhost' && !peerConf) {
29+
conf = localhostConf;
30+
} else if (peerStack === 'testnet' && !peerConf) {
2831
conf.testnet = true;
2932
}
30-
this.active = lisk.api(conf);
31-
this.stack = this.active.listPeers();
33+
34+
this.setPeerAPIObject(conf);
35+
this.currentPeerConfig = conf;
36+
if (!this.stack) {
37+
this.stack = this.active.listPeers();
38+
this.stack.localhost = [localhostConf, {
39+
node: 'localhost',
40+
port: 8000,
41+
}];
42+
}
43+
44+
this.check();
45+
}
46+
47+
setPeerAPIObject(config) {
48+
this.active = lisk.api(config);
3249

3350
this.active.getStatusPromise = () => {
3451
const deferred = $q.defer();
@@ -81,8 +98,6 @@ app.factory('$peers', ($timeout, $cookies, $location, $q) => {
8198
});
8299
return deferred.promise;
83100
};
84-
85-
this.check();
86101
}
87102

88103
check() {

src/karma.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module.exports = function (config) {
3737
noInfo: true,
3838
},
3939

40-
// list of files to exclude
40+
// List of files to exclude
4141
exclude: [],
4242

4343
// Rest results reporter to use

src/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
"test": "export NODE_ENV=test && karma start; grunt eslint",
1010
"test-live": "export NODE_ENV=test && export LIVE=true && karma start"
1111
},
12+
"author": "Lisk Foundation <admin@lisk.io>, lightcurve GmbH <admin@lightcurve.io>",
13+
"license": "GPL-3.0",
1214
"dependencies": {
1315
"angular": "=1.5.8",
1416
"angular-animate": "=1.5.8",
@@ -21,7 +23,7 @@
2123
"bitcore-mnemonic": "=1.1.1",
2224
"debug": "=2.2.0",
2325
"jquery": "=2.2.4",
24-
"lisk-js": "git://github.com/liskHQ/lisk-js.git#61-missing-API-features",
26+
"lisk-js": "git://github.com/liskHQ/lisk-js.git#development",
2527
"lodash": "=4.16.4",
2628
"moment": "=2.15.1",
2729
"numeral": "=1.5.3"
@@ -32,6 +34,7 @@
3234
"babel-loader": "=6.2.4",
3335
"babel-plugin-istanbul": "^4.0.0",
3436
"babel-plugin-syntax-trailing-function-commas": "=6.22.0",
37+
"babel-plugin-istanbul": "^4.0.0",
3538
"babel-preset-es2015": "=6.9.0",
3639
"chai": "=3.5.0",
3740
"clean-webpack-plugin": "=0.1.9",

src/test/components/login/login.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ describe('Login controller', () => {
103103
expect(spy).to.have.been.calledWith();
104104
});
105105

106-
it('creates this.listener(ev) which if called repeatedly will gnerate a random this.seed', () => {
106+
it('creates this.listener(ev) which if called repeatedly will generate a random this.seed', () => {
107107
controller.startGenratingNewPassphrase();
108108
expect(controller.seed).to.deep.equal(['00', '00', '00', '00', '00', '00', '00', '00', '00', '00', '00', '00', '00', '00', '00', '00']);
109109
expect(controller.progress).to.equal(0);

0 commit comments

Comments
 (0)