aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-09-07 05:36:15 +0800
committerDan Finlay <dan@danfinlay.com>2017-09-07 05:36:15 +0800
commitf9a052deed8749a1c6dd544df561967a568749d9 (patch)
tree1f1280b4d7558e82f2ee17322b62c13407c34b77 /app
parent714df393b406c515b0bb3abd4fcd8bde4ad53fde (diff)
downloadtangerine-wallet-browser-f9a052deed8749a1c6dd544df561967a568749d9.tar
tangerine-wallet-browser-f9a052deed8749a1c6dd544df561967a568749d9.tar.gz
tangerine-wallet-browser-f9a052deed8749a1c6dd544df561967a568749d9.tar.bz2
tangerine-wallet-browser-f9a052deed8749a1c6dd544df561967a568749d9.tar.lz
tangerine-wallet-browser-f9a052deed8749a1c6dd544df561967a568749d9.tar.xz
tangerine-wallet-browser-f9a052deed8749a1c6dd544df561967a568749d9.tar.zst
tangerine-wallet-browser-f9a052deed8749a1c6dd544df561967a568749d9.zip
Add first passing balance calc test
Diffstat (limited to 'app')
-rw-r--r--app/scripts/lib/pending-balance-calculator.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/app/scripts/lib/pending-balance-calculator.js b/app/scripts/lib/pending-balance-calculator.js
new file mode 100644
index 000000000..5b30354a2
--- /dev/null
+++ b/app/scripts/lib/pending-balance-calculator.js
@@ -0,0 +1,18 @@
+const BN = require('ethereumjs-util').BN
+const EthQuery = require('ethjs-query')
+
+class PendingBalanceCalculator {
+
+ constructor ({ getBalance, getPendingTransactions }) {
+ this.getPendingTransactions = getPendingTransactions
+ this.getBalance = getBalance
+ }
+
+ async getBalance() {
+ const balance = await this.getBalance
+ return balance
+ }
+
+}
+
+module.exports = PendingBalanceCalculator