Skip to content

Commit a2fe10d

Browse files
authored
Merge pull request #39 from GetScatter/ws
prebuild
2 parents 5732476 + cd891ef commit a2fe10d

File tree

6 files changed

+1
-111
lines changed

6 files changed

+1
-111
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "scatter",
3-
"version": "8.6.0",
3+
"version": "8.7.0",
44
"description": "Scatter Desktop Companion",
55
"private": true,
66
"main": "electron.js",

src/models/alerts/Alert.js

-9
This file was deleted.

src/services/KeyPairService.js

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import {BlockchainsArray, Blockchains} from '../models/Blockchains';
22
import PluginRepository from '../plugins/PluginRepository'
33
import * as Actions from '../store/constants';
44

5-
import Alert from '../models/alerts/Alert'
65
import PopupService from '../services/PopupService'
76
import {Popup} from '../models/popups/Popup'
87

src/services/QRService.js

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import StorageService from '../services/StorageService';
44
export default class QRService {
55

66
static createQR(data){
7-
//TODO: Needs to include salt
87
const qrData = JSON.stringify({data, salt:StorageService.getSalt()});
98
return QRCode.toDataURL(qrData,{ errorCorrectionLevel: 'L' });
109
}

src/services/RSAService.js

-40
This file was deleted.

src/util/ObjectHelpers.js

-59
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,6 @@
33
*/
44
export default class ObjectHelpers {
55

6-
/***
7-
* Groups an array by key
8-
* @param array
9-
* @param key
10-
* @returns {*}
11-
*/
12-
static groupBy(array, key){
13-
return array.reduce((acc, item) => {
14-
(acc[item[key]] = acc[item[key]] || []).push(item);
15-
return acc;
16-
}, {});
17-
}
18-
196
/***
207
* Makes a single level array distinct
218
* @param array
@@ -25,29 +12,6 @@ export default class ObjectHelpers {
2512
return array.reduce((a,b) => (a.includes(b)) ? a : a.concat(b), []);
2613
}
2714

28-
/***
29-
* Makes an object array distinct ( uses deep checking )
30-
* @param array
31-
* @returns {*}
32-
*/
33-
static distinctObjectArray(array){
34-
return array.reduce((a,b) => (!!a.find(x => this.deepEqual(x, b))) ? a : a.concat(b), []);
35-
}
36-
37-
/***
38-
* Checks deep equality for objects
39-
* @param objA
40-
* @param objB
41-
* @returns {boolean}
42-
*/
43-
static deepEqual(objA, objB) {
44-
const keys = Object.keys, typeA = typeof objA, typeB = typeof objB;
45-
return objA && objB && typeA === 'object' && typeA === typeB ? (
46-
keys(objA).length === keys(objB).length &&
47-
keys(objA).every(key => this.deepEqual(objA[key], objB[key]))
48-
) : (objA === objB);
49-
}
50-
5115
/***
5216
* Flattens an array into a single dimension
5317
* @param array
@@ -59,27 +23,4 @@ export default class ObjectHelpers {
5923
);
6024
}
6125

62-
/***
63-
* Flattens an objects keys into a single dimension
64-
* @param object
65-
* @returns {*}
66-
*/
67-
static objectToFlatKeys(object){
68-
return this.flatten(Object.keys(object).map(key => {
69-
if(object[key] !== null && typeof object[key] === 'object') return this.objectToFlatKeys(object[key])
70-
else return key;
71-
}))
72-
}
73-
74-
/***
75-
* Gets a field from an object by string dot notation, such as `location.country.code`
76-
* @param object
77-
* @param dotNotation
78-
* @returns {*}
79-
*/
80-
static getFieldFromObjectByDotNotation(object, dotNotation){
81-
let props = dotNotation.split(".");
82-
return props.reduce((obj,key)=> obj[key], object)
83-
}
84-
8526
}

0 commit comments

Comments
 (0)