aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-09-08 03:45:00 +0800
committerDan Finlay <dan@danfinlay.com>2017-09-08 03:45:00 +0800
commit74c6de7d23c979c091028d8bd599f389e2090bc1 (patch)
tree9a2980c1fbe634eb54334a0584ce23640eec7df5 /app
parent7b92268428cc2de4374bc669c524bb61959801f1 (diff)
downloadtangerine-wallet-browser-74c6de7d23c979c091028d8bd599f389e2090bc1.tar
tangerine-wallet-browser-74c6de7d23c979c091028d8bd599f389e2090bc1.tar.gz
tangerine-wallet-browser-74c6de7d23c979c091028d8bd599f389e2090bc1.tar.bz2
tangerine-wallet-browser-74c6de7d23c979c091028d8bd599f389e2090bc1.tar.lz
tangerine-wallet-browser-74c6de7d23c979c091028d8bd599f389e2090bc1.tar.xz
tangerine-wallet-browser-74c6de7d23c979c091028d8bd599f389e2090bc1.tar.zst
tangerine-wallet-browser-74c6de7d23c979c091028d8bd599f389e2090bc1.zip
Add constructor comment
Diffstat (limited to 'app')
-rw-r--r--app/scripts/lib/pending-balance-calculator.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/scripts/lib/pending-balance-calculator.js b/app/scripts/lib/pending-balance-calculator.js
index e4ff1e050..d5e2e4c17 100644
--- a/app/scripts/lib/pending-balance-calculator.js
+++ b/app/scripts/lib/pending-balance-calculator.js
@@ -4,6 +4,11 @@ const normalize = require('eth-sig-util').normalize
class PendingBalanceCalculator {
+ // Must be initialized with two functions:
+ // getBalance => Returns a promise of a BN of the current balance in Wei
+ // getPendingTransactions => Returns an array of TxMeta Objects,
+ // which have txParams properties, which include value, gasPrice, and gas,
+ // all in a base=16 hex format.
constructor ({ getBalance, getPendingTransactions }) {
this.getPendingTransactions = getPendingTransactions
this.getNetworkBalance = getBalance