Skip to content

Commit

Permalink
Wrap Uint8Array into Buffer for the browser version
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulBernier committed Dec 16, 2018
1 parent feb2ea0 commit fd796d8
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dist/factom-vote-struct.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/factom-vote.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "factom-vote",
"version": "0.1.5",
"version": "0.1.6",
"description": "JS implementation of the Factom voting specification",
"main": "src/factom-vote.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/write-vote/create-vote-struct.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function generateEligibleVotersChain(eligibleVoters, initiator) {
}

const keyPair = getKeyPair(initiator.secretKey);
const nonce = nacl.randomBytes(NONCE_SIZE);
const nonce = Buffer.from(nacl.randomBytes(NONCE_SIZE));

const content = Buffer.from(JSON.stringify(eligibleVoters), 'utf8');
const dataToSign = sha512(Buffer.concat([nonce, content]));
Expand Down

0 comments on commit fd796d8

Please sign in to comment.