aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/src/fetchers
diff options
context:
space:
mode:
Diffstat (limited to 'packages/0x.js/src/fetchers')
-rw-r--r--packages/0x.js/src/fetchers/simple_balance_and_proxy_allowance_fetcher.ts28
-rw-r--r--packages/0x.js/src/fetchers/simple_order_filled_cancelled_fetcher.ts28
2 files changed, 0 insertions, 56 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
deleted file mode 100644
index 21774d794..000000000
--- a/packages/0x.js/src/fetchers/simple_balance_and_proxy_allowance_fetcher.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import { BlockParamLiteral } from '@0xproject/types';
-import { BigNumber } from '@0xproject/utils';
-
-import { BalanceAndProxyAllowanceFetcher } from '../abstract/balance_and_proxy_allowance_fetcher';
-import { TokenWrapper } from '../contract_wrappers/token_wrapper';
-
-export class SimpleBalanceAndProxyAllowanceFetcher implements BalanceAndProxyAllowanceFetcher {
- private _tokenWrapper: TokenWrapper;
- private _defaultBlock: BlockParamLiteral;
- constructor(token: TokenWrapper, defaultBlock: BlockParamLiteral) {
- this._tokenWrapper = token;
- this._defaultBlock = defaultBlock;
- }
- public async getBalanceAsync(tokenAddress: string, userAddress: string): Promise<BigNumber> {
- const methodOpts = {
- defaultBlock: this._defaultBlock,
- };
- const balance = this._tokenWrapper.getBalanceAsync(tokenAddress, userAddress, methodOpts);
- return balance;
- }
- public async getProxyAllowanceAsync(tokenAddress: string, userAddress: string): Promise<BigNumber> {
- const methodOpts = {
- defaultBlock: this._defaultBlock,
- };
- const proxyAllowance = this._tokenWrapper.getProxyAllowanceAsync(tokenAddress, userAddress, methodOpts);
- return proxyAllowance;
- }
-}
diff --git a/packages/0x.js/src/fetchers/simple_order_filled_cancelled_fetcher.ts b/packages/0x.js/src/fetchers/simple_order_filled_cancelled_fetcher.ts
deleted file mode 100644
index b7548d54d..000000000
--- a/packages/0x.js/src/fetchers/simple_order_filled_cancelled_fetcher.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import { BlockParamLiteral } from '@0xproject/types';
-import { BigNumber } from '@0xproject/utils';
-
-import { OrderFilledCancelledFetcher } from '../abstract/order_filled_cancelled_fetcher';
-import { ExchangeWrapper } from '../contract_wrappers/exchange_wrapper';
-
-export class SimpleOrderFilledCancelledFetcher implements OrderFilledCancelledFetcher {
- private _exchangeWrapper: ExchangeWrapper;
- private _defaultBlock: BlockParamLiteral;
- constructor(exchange: ExchangeWrapper, defaultBlock: BlockParamLiteral) {
- this._exchangeWrapper = exchange;
- this._defaultBlock = defaultBlock;
- }
- public async getFilledTakerAmountAsync(orderHash: string): Promise<BigNumber> {
- const methodOpts = {
- defaultBlock: this._defaultBlock,
- };
- const filledTakerAmount = this._exchangeWrapper.getFilledTakerAmountAsync(orderHash, methodOpts);
- return filledTakerAmount;
- }
- public async getCancelledTakerAmountAsync(orderHash: string): Promise<BigNumber> {
- const methodOpts = {
- defaultBlock: this._defaultBlock,
- };
- const cancelledTakerAmount = this._exchangeWrapper.getCancelledTakerAmountAsync(orderHash, methodOpts);
- return cancelledTakerAmount;
- }
-}