diff options
author | Hsuan Lee <hsuan@cobinhood.com> | 2019-01-19 18:42:04 +0800 |
---|---|---|
committer | Hsuan Lee <hsuan@cobinhood.com> | 2019-01-19 18:42:04 +0800 |
commit | 7ae38906926dc09bc10670c361af0d2bf0050426 (patch) | |
tree | 5fb10ae366b987db09e4ddb4bc3ba0f75404ad08 /packages/order-utils/test/utils/simple_erc20_balance_and_proxy_allowance_fetcher.ts | |
parent | b5fd3c72a08aaa6957917d74c333387a16edf66b (diff) | |
download | dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.gz dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.bz2 dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.lz dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.xz dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.zst dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.zip |
Update dependency packages
Diffstat (limited to 'packages/order-utils/test/utils/simple_erc20_balance_and_proxy_allowance_fetcher.ts')
-rw-r--r-- | packages/order-utils/test/utils/simple_erc20_balance_and_proxy_allowance_fetcher.ts | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/packages/order-utils/test/utils/simple_erc20_balance_and_proxy_allowance_fetcher.ts b/packages/order-utils/test/utils/simple_erc20_balance_and_proxy_allowance_fetcher.ts deleted file mode 100644 index d3ea8b456..000000000 --- a/packages/order-utils/test/utils/simple_erc20_balance_and_proxy_allowance_fetcher.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { ERC20TokenContract } from '@0x/abi-gen-wrappers'; -import { BigNumber } from '@0x/utils'; - -import { AbstractBalanceAndProxyAllowanceFetcher } from '../../src/abstract/abstract_balance_and_proxy_allowance_fetcher'; - -export class SimpleERC20BalanceAndProxyAllowanceFetcher implements AbstractBalanceAndProxyAllowanceFetcher { - private readonly _erc20TokenContract: ERC20TokenContract; - private readonly _erc20ProxyAddress: string; - constructor(erc20TokenWrapper: ERC20TokenContract, erc20ProxyAddress: string) { - this._erc20TokenContract = erc20TokenWrapper; - this._erc20ProxyAddress = erc20ProxyAddress; - } - public async getBalanceAsync(_assetData: string, userAddress: string): Promise<BigNumber> { - // HACK: We cheat and don't pass in the assetData since it's always the same token used - // in our tests. - const balance = await this._erc20TokenContract.balanceOf.callAsync(userAddress); - return balance; - } - public async getProxyAllowanceAsync(_assetData: string, userAddress: string): Promise<BigNumber> { - // HACK: We cheat and don't pass in the assetData since it's always the same token used - // in our tests. - const proxyAllowance = await this._erc20TokenContract.allowance.callAsync(userAddress, this._erc20ProxyAddress); - return proxyAllowance; - } -} |