aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/util/balances.ts
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2017-12-20 13:44:08 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-12-20 22:30:25 +0800
commitcb11aec84df346d5180c7d5874859c1c34f0bf1c (patch)
treeb959a65bdcfc3e8b01dca1bc160f93a0df8a4bf9 /packages/contracts/util/balances.ts
parent972e1675f6490bc10e8d9fd64cce2f7945cd4840 (diff)
downloaddexon-sol-tools-cb11aec84df346d5180c7d5874859c1c34f0bf1c.tar
dexon-sol-tools-cb11aec84df346d5180c7d5874859c1c34f0bf1c.tar.gz
dexon-sol-tools-cb11aec84df346d5180c7d5874859c1c34f0bf1c.tar.bz2
dexon-sol-tools-cb11aec84df346d5180c7d5874859c1c34f0bf1c.tar.lz
dexon-sol-tools-cb11aec84df346d5180c7d5874859c1c34f0bf1c.tar.xz
dexon-sol-tools-cb11aec84df346d5180c7d5874859c1c34f0bf1c.tar.zst
dexon-sol-tools-cb11aec84df346d5180c7d5874859c1c34f0bf1c.zip
Add new underscore-privates rule to @0xproject/tslint-config and fix lint errors
Diffstat (limited to 'packages/contracts/util/balances.ts')
-rw-r--r--packages/contracts/util/balances.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/contracts/util/balances.ts b/packages/contracts/util/balances.ts
index 7f5e843a5..5800a2008 100644
--- a/packages/contracts/util/balances.ts
+++ b/packages/contracts/util/balances.ts
@@ -7,16 +7,16 @@ import {BalancesByOwner, ContractInstance} from './types';
bigNumberConfigs.configure();
export class Balances {
- private tokenContractInstances: ContractInstance[];
- private ownerAddresses: string[];
+ private _tokenContractInstances: ContractInstance[];
+ private _ownerAddresses: string[];
constructor(tokenContractInstances: ContractInstance[], ownerAddresses: string[]) {
- this.tokenContractInstances = tokenContractInstances;
- this.ownerAddresses = ownerAddresses;
+ this._tokenContractInstances = tokenContractInstances;
+ this._ownerAddresses = ownerAddresses;
}
public async getAsync(): Promise<BalancesByOwner> {
const balancesByOwner: BalancesByOwner = {};
- for (const tokenContractInstance of this.tokenContractInstances) {
- for (const ownerAddress of this.ownerAddresses) {
+ for (const tokenContractInstance of this._tokenContractInstances) {
+ for (const ownerAddress of this._ownerAddresses) {
let balance = await tokenContractInstance.balanceOf(ownerAddress);
balance = new BigNumber(balance);
if (_.isUndefined(balancesByOwner[ownerAddress])) {