aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/util/balances.ts
diff options
context:
space:
mode:
authorBrandon Millman <brandon@0xproject.com>2017-12-22 02:16:25 +0800
committerGitHub <noreply@github.com>2017-12-22 02:16:25 +0800
commitcb3582289ff94857d5956bbd71dbf68ee3f42ecf (patch)
tree62c94cba698834e33cf284c084c04e30766190e8 /packages/contracts/util/balances.ts
parent734d220d6050ad7b9fa66e5e0695b848501eeff6 (diff)
parent2d53b7d9a499e4fb5791fe34cae5ef118bdfc0ce (diff)
downloaddexon-sol-tools-cb3582289ff94857d5956bbd71dbf68ee3f42ecf.tar
dexon-sol-tools-cb3582289ff94857d5956bbd71dbf68ee3f42ecf.tar.gz
dexon-sol-tools-cb3582289ff94857d5956bbd71dbf68ee3f42ecf.tar.bz2
dexon-sol-tools-cb3582289ff94857d5956bbd71dbf68ee3f42ecf.tar.lz
dexon-sol-tools-cb3582289ff94857d5956bbd71dbf68ee3f42ecf.tar.xz
dexon-sol-tools-cb3582289ff94857d5956bbd71dbf68ee3f42ecf.tar.zst
dexon-sol-tools-cb3582289ff94857d5956bbd71dbf68ee3f42ecf.zip
Merge pull request #285 from 0xProject/fix/underscorePrivate
Add new underscore-privates rule to @0xproject/tslint-config and fix …
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])) {