Add new underscore-privates rule to @0xproject/tslint-config and fix lint errors

This commit is contained in:
Brandon Millman
2017-12-20 00:44:08 -05:00
committed by Leonid Logvinov
parent 972e1675f6
commit cb11aec84d
93 changed files with 1418 additions and 1345 deletions

View File

@@ -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])) {