Skip to content

Commit 537a645

Browse files
authored
Merge pull request #320 from GetScatter/ridl
Ridl basic integration and various other fixes (see comment)
2 parents 920a626 + b080c91 commit 537a645

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1631
-545
lines changed

electron.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ class NotificationService {
239239
}
240240
}
241241

242+
require("babel-polyfill")
242243
const Transport = require('@ledgerhq/hw-transport-node-hid');
243244

244245
const NodeMachineId = require('node-machine-id');
@@ -251,13 +252,14 @@ const ecc = require("eosjs-ecc");
251252
let seed, key;
252253
ipcMain.on('key', (event, arg) => {
253254
if(event.sender.history[0].indexOf('popout') > -1) return;
255+
if(arg === null) key = null;
254256
if(key) return;
255257
key = arg;
256258
});
257259
ipcMain.on('seeding', (event, arg) => seed = arg);
258260
ipcMain.on('seed', (event, arg) => {
259261
const {data, sig} = arg;
260-
if(!isDev && ecc.recover(sig, 'seed') !== key) return event.sender.send('seed', null);
262+
if(!isDev && ecc.recover(sig, data) !== key) return event.sender.send('seed', null);
261263
event.sender.send('seed', seed);
262264
});
263265

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "scatter",
3-
"version": "10.1.2",
3+
"version": "10.2.0",
44
"description": "Scatter Desktop Companion",
55
"private": true,
66
"main": "electron.js",
@@ -41,7 +41,7 @@
4141
},
4242
"dependencies": {
4343
"@ledgerhq/hw-app-eth": "^4.23.0",
44-
"@ledgerhq/hw-transport-node-hid": "^4.22.0",
44+
"@ledgerhq/hw-transport-node-hid": "^4.54.0",
4545
"aes-oop": "^1.0.4",
4646
"animate.css": "^3.7.0",
4747
"asn1-ber": "^1.0.9",
@@ -63,6 +63,7 @@
6363
"node-notifier": "^5.3.0",
6464
"scrypt-async": "^2.0.1",
6565
"socket.io": "^2.1.1",
66+
"tweetnacl": "^1.0.1",
6667
"vue-markdown": "^2.2.4"
6768
},
6869
"devDependencies": {
@@ -120,7 +121,7 @@
120121
"postcss-loader": "^2.1.6",
121122
"postcss-url": "^7.2.1",
122123
"qrcode": "^1.2.2",
123-
"ridl": "^1.1.1",
124+
"ridl": "^2.0.47",
124125
"rimraf": "^2.6.0",
125126
"sass-loader": "^7.1.0",
126127
"selenium-server": "^3.14.0",

src/components/Processes.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<section :key="process.id" class="process" v-for="process in processes">
55
<figure class="kill icon-cancel" @click="process.kill()"></figure>
66
<figure class="title">
7-
<span key="title" v-if="process.progress < 100">{{process.title}}</span>
8-
<b key="done" v-else>Done!</b>
7+
<span key="title">{{process.title}}</span>
8+
<b key="done" v-if="process.progress === 100">Done!</b>
99
</figure>
1010
<transition name="delayed-fade" mode="out-in">
1111
<figure class="sub-title" v-if="process.subTitle && process.progress < 100">{{process.subTitle}}</figure>

src/components/UserBar.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
<template>
22
<section class="user-bar" v-if="keypairs.length">
33
<section class="actions">
4-
<router-link :to="{name:RouteNames.IDENTITY}" class="action">
4+
<router-link :to="{name:RouteNames.IDENTITY, query:{ridl:false}}" class="action">
55
{{locale(langKeys.USER_BAR.ManageIdentity)}}
66
</router-link>
7+
<router-link :to="{name:RouteNames.IDENTITY, query:{ridl:true}}" class="action">
8+
RIDL
9+
</router-link>
710

811
</section>
912

src/components/panels/home/Apps.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<section class="apps">
33
<section class="split-inputs">
44
<SearchBar style="flex:1; margin-left:-10px;" :placeholder="locale(langKeys.DASHBOARD.APPS.SearchPlaceholder)" v-on:terms="x => searchTerms = x" />
5+
<btn v-if="permissions.length" small="1" borderless="1" v-on:clicked="removeAll" :text="locale(langKeys.GENERIC.RemoveAll)" />
56
<btn small="1" style="margin-right:30px; font-weight: normal;" v-on:clicked="goToApps" :text="locale(langKeys.GENERIC.Browse)" />
67
</section>
78

@@ -127,6 +128,9 @@
127128
removePermissions(origin){
128129
PermissionService.removeAllPermissionsFor(origin);
129130
},
131+
removeAll(){
132+
PermissionService.removeAllPermissions();
133+
},
130134
goToPermission(origin){
131135
this.$router.push({name:this.RouteNames.PERMISSION, params:{origin}})
132136
},

src/components/panels/keypair/KeypairDashboard.vue

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -52,31 +52,31 @@
5252

5353
<section style="padding-bottom:20px;">
5454

55-
<section class="action-box top-pad">
56-
<label>{{locale(langKeys.KEYPAIR.DASHBOARD.ADD_ACCOUNT.LinkEosAccountLabel)}}</label>
57-
<p>{{locale(langKeys.KEYPAIR.DASHBOARD.ADD_ACCOUNT.LinkEosAccountDescription)}}</p>
58-
<br>
59-
<br>
60-
61-
<section class="key-val">
62-
<section class="split-inputs">
63-
<sel style="flex:1; margin-left:0;" :label="locale(langKeys.KEYPAIR.DASHBOARD.ADD_ACCOUNT.AccountNetworkLabel)"
64-
:selected="manualAccountNetwork"
65-
:options="eosNetworks"
66-
:parser="network => network.name"
67-
v-on:changed="x => manualAccountNetwork = x"></sel>
68-
69-
<cin style="margin-bottom:0; flex:1;"
70-
:text="newAccountName"
71-
v-on:changed="x => newAccountName = x"
72-
placeholder="your.account@owner"
73-
:label="locale(langKeys.GENERIC.AccountName)" />
74-
75-
<btn :disabled="invalidNewAccountName" :text="locale(langKeys.GENERIC.Add)" style="margin-top:20px; flex:0.2;"
76-
red="1" v-on:clicked="manuallyAddAccount" />
77-
</section>
78-
</section>
79-
</section>
55+
<!--<section class="action-box top-pad">-->
56+
<!--<label>{{locale(langKeys.KEYPAIR.DASHBOARD.ADD_ACCOUNT.LinkEosAccountLabel)}}</label>-->
57+
<!--<p>{{locale(langKeys.KEYPAIR.DASHBOARD.ADD_ACCOUNT.LinkEosAccountDescription)}}</p>-->
58+
<!--<br>-->
59+
<!--<br>-->
60+
61+
<!--<section class="key-val">-->
62+
<!--<section class="split-inputs">-->
63+
<!--<sel style="flex:1; margin-left:0;" :label="locale(langKeys.KEYPAIR.DASHBOARD.ADD_ACCOUNT.AccountNetworkLabel)"-->
64+
<!--:selected="manualAccountNetwork"-->
65+
<!--:options="eosNetworks"-->
66+
<!--:parser="network => network.name"-->
67+
<!--v-on:changed="x => manualAccountNetwork = x"></sel>-->
68+
69+
<!--<cin style="margin-bottom:0; flex:1;"-->
70+
<!--:text="newAccountName"-->
71+
<!--v-on:changed="x => newAccountName = x"-->
72+
<!--placeholder="your.account@owner"-->
73+
<!--:label="locale(langKeys.GENERIC.AccountName)" />-->
74+
75+
<!--<btn :disabled="invalidNewAccountName" :text="locale(langKeys.GENERIC.Add)" style="margin-top:20px; flex:0.2;"-->
76+
<!--red="1" v-on:clicked="manuallyAddAccount" />-->
77+
<!--</section>-->
78+
<!--</section>-->
79+
<!--</section>-->
8080

8181
<section class="action-box top-pad" v-if="canCreateAccounts">
8282
<label>{{locale(langKeys.KEYPAIR.DASHBOARD.ADD_ACCOUNT.CreateEosAccountLabel)}}</label>
@@ -163,7 +163,7 @@
163163
return false;
164164
},
165165
canCreateAccounts(){
166-
if(!this.keypair.external) return true;
166+
if(this.keypair.external && this.keypair.accounts().length) return true;
167167
if(this.accounts.find(x => x.blockchain() === Blockchains.EOSIO && !x.keypair().external)) return true;
168168
return false;
169169
},

src/components/panels/keypair/existing/KeypairExport.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,10 @@
217217
.key {
218218
font-size: 11px;
219219
}
220+
221+
.public {
222+
font-size: 11px;
223+
}
220224
}
221225
222226
.types {

src/components/panels/settings/SettingsFirewall.vue

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
<label>{{locale(langKeys.SETTINGS.FIREWALL.ENABLED.Label)}}</label>
66
<p>{{locale(langKeys.SETTINGS.FIREWALL.ENABLED.Description)}}</p>
77

8-
<btn :disabled="true" text="Coming Soon" />
8+
<section class="switch bottomed" @click="toggleFirewall">
9+
<figure class="dot" :class="{'disabled':!scatter.settings.firewall.enabled}"></figure>
10+
</section>
911
</section>
1012

1113
</section>
@@ -21,14 +23,18 @@
2123
}},
2224
computed:{
2325
...mapState([
24-
26+
'scatter',
2527
]),
2628
...mapGetters([
2729
2830
]),
2931
},
3032
methods: {
31-
33+
toggleFirewall(){
34+
const scatter = this.scatter.clone();
35+
scatter.settings.firewall.enabled = !scatter.settings.firewall.enabled;
36+
this[Actions.SET_SCATTER](scatter);
37+
},
3238
...mapActions([
3339
Actions.SET_SCATTER
3440
])

src/components/popins/fullscreen/ConfirmPassword.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
if(!this.password.length) return;
6161
if(this.returnOnly) return this.returnResult(this.password);
6262
63-
const verified = await PasswordService.verifyPassword(this.password, false);
63+
const verified = await PasswordService.verifyPassword(this.password);
6464
if(!verified) PopupService.push(Popup.snackbarBadPassword());
6565
this.returnResult(verified);
6666
},

src/components/popins/fullscreen/UnlinkAccount.vue

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,40 @@
11
<template>
22
<section>
33
<back-bar v-on:back="returnResult(null)" />
4-
<section class="panel-container limited">
5-
<section class="head">
6-
<figure class="icon icon-trash"></figure>
7-
<figure class="title">{{locale(langKeys.POPINS.FULLSCREEN.UNLINK_ACCOUNT.Title)}}</figure>
8-
<p>{{account.sendable()}}</p>
9-
10-
<br>
11-
<section class="disclaimer less-pad red">
12-
{{locale(langKeys.POPINS.FULLSCREEN.UNLINK_ACCOUNT.Desc)}}
13-
14-
<p v-if="authorities.length">
15-
{{locale(langKeys.POPINS.FULLSCREEN.UNLINK_ACCOUNT.SubDesc)}}
16-
</p>
4+
<section v-if="account">
5+
<section class="panel-container limited">
6+
<section class="head">
7+
<figure class="icon icon-trash"></figure>
8+
<figure class="title">{{locale(langKeys.POPINS.FULLSCREEN.UNLINK_ACCOUNT.Title)}}</figure>
9+
<p>{{account.sendable()}}</p>
10+
11+
<br>
12+
<section class="disclaimer less-pad red">
13+
{{locale(langKeys.POPINS.FULLSCREEN.UNLINK_ACCOUNT.Desc)}}
14+
15+
<p v-if="authorities.length">
16+
{{locale(langKeys.POPINS.FULLSCREEN.UNLINK_ACCOUNT.SubDesc)}}
17+
</p>
18+
</section>
1719
</section>
18-
</section>
1920

2021

21-
<section class="list">
22-
<FlatList :label="locale(langKeys.POPINS.FULLSCREEN.UNLINK_ACCOUNT.AuthoritiesLabel)"
23-
select-blue="1"
24-
:selected="selectedAuthorities"
25-
:items="authorities"
26-
v-on:selected="addOrRemoveAuthority" />
22+
<section class="list">
23+
<FlatList :label="locale(langKeys.POPINS.FULLSCREEN.UNLINK_ACCOUNT.AuthoritiesLabel)"
24+
select-blue="1"
25+
:selected="selectedAuthorities"
26+
:items="authorities"
27+
v-on:selected="addOrRemoveAuthority" />
28+
</section>
2729
</section>
2830

29-
30-
31-
</section>
32-
<section class="action-bar short bottom centered">
33-
<btn :disabled="authorities.length > 1 && !selectedAuthorities.length"
34-
:text="locale(langKeys.GENERIC.Confirm)" blue="1"
35-
v-on:clicked="unlinkAccount" />
31+
<section class="action-bar short bottom centered">
32+
<btn :disabled="authorities.length > 1 && !selectedAuthorities.length"
33+
:text="locale(langKeys.GENERIC.Confirm)" blue="1"
34+
v-on:clicked="unlinkAccount" />
35+
</section>
3636
</section>
37+
3738
</section>
3839
</template>
3940

0 commit comments

Comments
 (0)