From fcb6ac9de6b4985603b775c9237950c681a78b54 Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Fri, 22 Jul 2016 13:34:23 +1000 Subject: [PATCH] tests: avoid superfluous ECPair creation --- test/integration/crypto.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/integration/crypto.js b/test/integration/crypto.js index 897e962..c3cb237 100644 --- a/test/integration/crypto.js +++ b/test/integration/crypto.js @@ -25,7 +25,7 @@ describe('bitcoinjs-lib (crypto)', function () { return { shared: new bitcoin.ECPair(null, Qprime), - nonce: new bitcoin.ECPair(null, noncePair.Q) + nonce: noncePair.Q } } @@ -41,7 +41,7 @@ describe('bitcoinjs-lib (crypto)', function () { var stealthS = stealthSend(receiver.Q) // public, done by sender // ... sender now reveals nonce to receiver - var stealthR = stealthReceive(receiver.d, stealthS.nonce.Q) // private, done by receiver + var stealthR = stealthReceive(receiver.d, stealthS.nonce) // private, done by receiver // and check that we derived both sides correctly assert.equal(stealthS.shared.getAddress(), stealthR.getAddress())