From 5c91e5d45afaa22a71bfcdbd4c956a8993388bdb Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 23 Nov 2016 15:32:32 -0800 Subject: Remove whitespace --- public/js/calculator.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'public/js/calculator.js') diff --git a/public/js/calculator.js b/public/js/calculator.js index c85c9bb3..6e71b56a 100644 --- a/public/js/calculator.js +++ b/public/js/calculator.js @@ -201,14 +201,13 @@ return listen(); }; return g.blockchain.onmessage = function(e) { - var amount, j, len, output, ref, tx, txid; + var amount, j, len, output, ref, tx; tx = JSON.parse(e.data); amount = 0; - txid = tx.hash; - if (txid === g.last) { + if (tx.hash === g.last_seen) { return; } - g.last = txid; + g.last_seen = tx.hash; ref = tx.outputs; for (j = 0, len = ref.length; j < len; j++) { output = ref[j]; @@ -216,7 +215,7 @@ amount += output.value / 100000000; } } - return logTransaction(txid, amount); + return logTransaction(tx.hash, amount); }; } }; -- cgit v1.2.3