diff options
Diffstat (limited to 'packages/0x.js/src/fetchers/simple_balance_and_proxy_allowance_fetcher.ts')
-rw-r--r-- | packages/0x.js/src/fetchers/simple_balance_and_proxy_allowance_fetcher.ts | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/packages/0x.js/src/fetchers/simple_balance_and_proxy_allowance_fetcher.ts b/packages/0x.js/src/fetchers/simple_balance_and_proxy_allowance_fetcher.ts index 877f07a22..c00dba5cf 100644 --- a/packages/0x.js/src/fetchers/simple_balance_and_proxy_allowance_fetcher.ts +++ b/packages/0x.js/src/fetchers/simple_balance_and_proxy_allowance_fetcher.ts @@ -5,22 +5,24 @@ import {BalanceAndProxyAllowanceFetcher} from '../abstract/balance_and_proxy_all import {TokenWrapper} from '../contract_wrappers/token_wrapper'; export class SimpleBalanceAndProxyAllowanceFetcher implements BalanceAndProxyAllowanceFetcher { - private _token: TokenWrapper; + private _tokenWrapper: TokenWrapper; private _defaultBlock: BlockParamLiteral; constructor(token: TokenWrapper, defaultBlock: BlockParamLiteral) { - this._token = token; + this._tokenWrapper = token; this._defaultBlock = defaultBlock; } public async getBalanceAsync(tokenAddress: string, userAddress: string): Promise<BigNumber> { const methodOpts = { defaultBlock: this._defaultBlock, }; - return this._token.getBalanceAsync(tokenAddress, userAddress, methodOpts); + const balance = this._tokenWrapper.getBalanceAsync(tokenAddress, userAddress, methodOpts); + return balance; } public async getProxyAllowanceAsync(tokenAddress: string, userAddress: string): Promise<BigNumber> { const methodOpts = { defaultBlock: this._defaultBlock, }; - return this._token.getProxyAllowanceAsync(tokenAddress, userAddress, methodOpts); + const proxyAllowance = this._tokenWrapper.getProxyAllowanceAsync(tokenAddress, userAddress, methodOpts); + return proxyAllowance; } } |