From 244aa8df92ba4ca169d58448b4e7213e260dc7d7 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 7 Apr 2014 01:23:54 -0400 Subject: [PATCH] Fix NaCL priv calc code --- js/helpers.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/helpers.js b/js/helpers.js index 608b278990f4..877313793ba2 100644 --- a/js/helpers.js +++ b/js/helpers.js @@ -422,8 +422,9 @@ var crypto_tests = {}; if (USE_NACL) { postNaclMessage({command: "bytesToPriv", priv: privKey}, function(message) { - postNaclMessage({command: "privToPub", priv: message.res}, function(message) { - callback({ pubKey: prependVersion(message.res), privKey: privKey }); + var priv = message.res; + postNaclMessage({command: "privToPub", priv: priv}, function(message) { + callback({ pubKey: prependVersion(message.res), privKey: priv }); }); }); } else {