|
|
|
@ -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 |
|
|
|
|