aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-09-08 03:47:52 +0800
committerDan Finlay <dan@danfinlay.com>2017-09-08 03:47:52 +0800
commitc616581001a7413a289b108b347005d53fb14732 (patch)
tree2a08a612180af81b7740eebd1bcb0c86f0519e1a
parenta95a3c7e4f4d1331394a7bf92a77678fe8087c04 (diff)
downloadtangerine-wallet-browser-c616581001a7413a289b108b347005d53fb14732.tar
tangerine-wallet-browser-c616581001a7413a289b108b347005d53fb14732.tar.gz
tangerine-wallet-browser-c616581001a7413a289b108b347005d53fb14732.tar.bz2
tangerine-wallet-browser-c616581001a7413a289b108b347005d53fb14732.tar.lz
tangerine-wallet-browser-c616581001a7413a289b108b347005d53fb14732.tar.xz
tangerine-wallet-browser-c616581001a7413a289b108b347005d53fb14732.tar.zst
tangerine-wallet-browser-c616581001a7413a289b108b347005d53fb14732.zip
Remove logs
-rw-r--r--app/scripts/lib/pending-balance-calculator.js8
-rw-r--r--test/unit/pending-balance-test.js5
2 files changed, 0 insertions, 13 deletions
diff --git a/app/scripts/lib/pending-balance-calculator.js b/app/scripts/lib/pending-balance-calculator.js
index 4e1189a65..8564f0134 100644
--- a/app/scripts/lib/pending-balance-calculator.js
+++ b/app/scripts/lib/pending-balance-calculator.js
@@ -15,7 +15,6 @@ class PendingBalanceCalculator {
}
async getBalance() {
- console.log('getting balance')
const results = await Promise.all([
this.getNetworkBalance(),
this.getPendingTransactions(),
@@ -24,23 +23,16 @@ class PendingBalanceCalculator {
const balance = results[0]
const pending = results[1]
- console.dir(pending)
- console.dir(balance.toString())
- console.trace('but why')
-
const pendingValue = pending.reduce((total, tx) => {
return total.add(this.valueFor(tx))
}, new BN(0))
- console.log(`subtracting ${pendingValue.toString()} from ${balance.toString()}`)
-
return `0x${ balance.sub(pendingValue).toString(16) }`
}
valueFor (tx) {
const txValue = tx.txParams.value
const normalized = normalize(txValue).substring(2)
- console.log({ txValue, normalized })
const value = this.hexToBn(txValue)
return value
}
diff --git a/test/unit/pending-balance-test.js b/test/unit/pending-balance-test.js
index a9b0f7b66..e1d5f9303 100644
--- a/test/unit/pending-balance-test.js
+++ b/test/unit/pending-balance-test.js
@@ -57,12 +57,7 @@ describe('PendingBalanceCalculator', function () {
})
it('returns the network balance', async function () {
- console.log('one')
- console.dir(balanceCalculator)
- console.dir(balanceCalculator.getBalance.toString())
const result = await balanceCalculator.getBalance()
- console.log('two')
- console.dir(result)
assert.equal(result, '0x0', `gave ${result} needed '0x0'`)
return true
})