diff options
Diffstat (limited to 'src/stores')
-rw-r--r-- | src/stores/balance_proxy_allowance_lazy_store.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/stores/balance_proxy_allowance_lazy_store.ts b/src/stores/balance_proxy_allowance_lazy_store.ts index e8178b9a9..7f392cb82 100644 --- a/src/stores/balance_proxy_allowance_lazy_store.ts +++ b/src/stores/balance_proxy_allowance_lazy_store.ts @@ -6,7 +6,7 @@ import {TokenWrapper} from '../contract_wrappers/token_wrapper'; * Copy on read store for balances/proxyAllowances of tokens/accounts */ export class BalanceAndProxyAllowanceLazyStore { - protected token: TokenWrapper; + private token: TokenWrapper; private balance: { [tokenAddress: string]: { [userAddress: string]: BigNumber, @@ -22,7 +22,7 @@ export class BalanceAndProxyAllowanceLazyStore { this.balance = {}; this.proxyAllowance = {}; } - protected async getBalanceAsync(tokenAddress: string, userAddress: string): Promise<BigNumber> { + public async getBalanceAsync(tokenAddress: string, userAddress: string): Promise<BigNumber> { if (_.isUndefined(this.balance[tokenAddress]) || _.isUndefined(this.balance[tokenAddress][userAddress])) { const balance = await this.token.getBalanceAsync(tokenAddress, userAddress); this.setBalance(tokenAddress, userAddress, balance); @@ -30,13 +30,13 @@ export class BalanceAndProxyAllowanceLazyStore { const cachedBalance = this.balance[tokenAddress][userAddress]; return cachedBalance; } - protected setBalance(tokenAddress: string, userAddress: string, balance: BigNumber): void { + public setBalance(tokenAddress: string, userAddress: string, balance: BigNumber): void { if (_.isUndefined(this.balance[tokenAddress])) { this.balance[tokenAddress] = {}; } this.balance[tokenAddress][userAddress] = balance; } - protected async getProxyAllowanceAsync(tokenAddress: string, userAddress: string): Promise<BigNumber> { + public async getProxyAllowanceAsync(tokenAddress: string, userAddress: string): Promise<BigNumber> { if (_.isUndefined(this.proxyAllowance[tokenAddress]) || _.isUndefined(this.proxyAllowance[tokenAddress][userAddress])) { const proxyAllowance = await this.token.getProxyAllowanceAsync(tokenAddress, userAddress); @@ -45,7 +45,7 @@ export class BalanceAndProxyAllowanceLazyStore { const cachedProxyAllowance = this.proxyAllowance[tokenAddress][userAddress]; return cachedProxyAllowance; } - protected setProxyAllowance(tokenAddress: string, userAddress: string, proxyAllowance: BigNumber): void { + public setProxyAllowance(tokenAddress: string, userAddress: string, proxyAllowance: BigNumber): void { if (_.isUndefined(this.proxyAllowance[tokenAddress])) { this.proxyAllowance[tokenAddress] = {}; } |