Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nsjames committed Aug 7, 2018
1 parent 0f05558 commit c2d9aed
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scatter",
"version": "8.2.2",
"version": "8.3.0",
"description": "Scatter Desktop Companion",
"private": true,
"main": "electron.js",
Expand Down
1 change: 0 additions & 1 deletion src/components/panels/Keypair.vue
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@
props:['kp'],
methods: {
async toggleQR(){
//TODO: Needs to include salt
if(this.qr === '') this.qr = await QRService.createQR(this.keypair.privateKey);
else this.qr = '';
},
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/defaults/eos.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export default class EOS extends Plugin {

let sig;
if(arbitrary && isHash) sig = ecc.Signature.signHash(payload.data, privateKey).toString();
return ecc.sign(Buffer.from(arbitrary ? payload.data : payload.buf.data, 'utf8'), privateKey);
return ecc.sign(Buffer.from(arbitrary ? payload.data : payload.buf, 'utf8'), privateKey);
}

async requestParser(signargs, network){
Expand Down
5 changes: 4 additions & 1 deletion src/services/QRService.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import QRCode from 'qrcode';
import StorageService from '../services/StorageService';

export default class QRService {

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

}

0 comments on commit c2d9aed

Please sign in to comment.