aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/src/utils/simple_erc20_balance_and_allowance_fetcher.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/contracts/src/utils/simple_erc20_balance_and_allowance_fetcher.ts')
-rw-r--r--packages/contracts/src/utils/simple_erc20_balance_and_allowance_fetcher.ts20
1 files changed, 0 insertions, 20 deletions
diff --git a/packages/contracts/src/utils/simple_erc20_balance_and_allowance_fetcher.ts b/packages/contracts/src/utils/simple_erc20_balance_and_allowance_fetcher.ts
deleted file mode 100644
index 6eed9227a..000000000
--- a/packages/contracts/src/utils/simple_erc20_balance_and_allowance_fetcher.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { AbstractBalanceAndProxyAllowanceFetcher } from '@0xproject/order-utils';
-import { BigNumber } from '@0xproject/utils';
-
-import { ERC20Wrapper } from './erc20_wrapper';
-
-// TODO(fabio): Refactor this to also work for ERC721!
-export class SimpleERC20BalanceAndProxyAllowanceFetcher implements AbstractBalanceAndProxyAllowanceFetcher {
- private _erc20TokenWrapper: ERC20Wrapper;
- constructor(erc20TokenWrapper: ERC20Wrapper) {
- this._erc20TokenWrapper = erc20TokenWrapper;
- }
- public async getBalanceAsync(tokenAddress: string, userAddress: string): Promise<BigNumber> {
- const balance = await this._erc20TokenWrapper.getBalanceAsync(userAddress, tokenAddress);
- return balance;
- }
- public async getProxyAllowanceAsync(tokenAddress: string, userAddress: string): Promise<BigNumber> {
- const proxyAllowance = await this._erc20TokenWrapper.getProxyAllowanceAsync(userAddress, tokenAddress);
- return proxyAllowance;
- }
-}