Skip to content

Commit

Permalink
Fix secalot sign
Browse files Browse the repository at this point in the history
  • Loading branch information
gamalielhere committed Sep 7, 2018
1 parent d4a4133 commit 943f522
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/wallets/hardware/secalot/secalotEth.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,14 @@ SecalotEth.prototype.signMessage = function(path, message, callback) {
return;
}
if (apdus.length === 0) {
const result = {};
const obj = {};
const v = response[0] + 27;
result['v'] = Buffer.from([v]).toString('hex');
result['r'] = response.slice(1, 1 + 32).toString('hex');
result['s'] = response.slice(1 + 32, 1 + 32 + 32).toString('hex');
callback(result);
obj['v'] = Buffer.from([v]).toString('hex');
obj['r'] = response.slice(1, 1 + 32).toString('hex');
obj['s'] = response.slice(1 + 32, 1 + 32 + 32).toString('hex');
const result = obj['r'] + obj['s'] + obj['v'];

callback('0x' + result.toString('hex'));
} else {
self.comm.exchange(apdus.shift(), localCallback);
}
Expand Down
1 change: 1 addition & 0 deletions vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module.exports = {
devServer: {
https: true,
host: '0.0.0.0',
hotOnly: true,
port: 8080
},
plugins: [
Expand Down

0 comments on commit 943f522

Please sign in to comment.