diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-06-27 16:19:10 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-06-29 22:52:52 +0800 |
commit | 6cc5e45183ca2ae6d4dd2176ecb5efdce53f38ea (patch) | |
tree | ff7602291e2e4a9f2e8d99897c85d8bccd6027ad /packages/contract-wrappers/src/fetchers | |
parent | 618c7ef48affecce306d0e6e879e498e20aa5509 (diff) | |
download | dexon-sol-tools-6cc5e45183ca2ae6d4dd2176ecb5efdce53f38ea.tar dexon-sol-tools-6cc5e45183ca2ae6d4dd2176ecb5efdce53f38ea.tar.gz dexon-sol-tools-6cc5e45183ca2ae6d4dd2176ecb5efdce53f38ea.tar.bz2 dexon-sol-tools-6cc5e45183ca2ae6d4dd2176ecb5efdce53f38ea.tar.lz dexon-sol-tools-6cc5e45183ca2ae6d4dd2176ecb5efdce53f38ea.tar.xz dexon-sol-tools-6cc5e45183ca2ae6d4dd2176ecb5efdce53f38ea.tar.zst dexon-sol-tools-6cc5e45183ca2ae6d4dd2176ecb5efdce53f38ea.zip |
Remove exchange-related functionality for now
Diffstat (limited to 'packages/contract-wrappers/src/fetchers')
-rw-r--r-- | packages/contract-wrappers/src/fetchers/simple_balance_and_proxy_allowance_fetcher.ts | 28 | ||||
-rw-r--r-- | packages/contract-wrappers/src/fetchers/simple_order_filled_cancelled_fetcher.ts | 36 |
2 files changed, 0 insertions, 64 deletions
diff --git a/packages/contract-wrappers/src/fetchers/simple_balance_and_proxy_allowance_fetcher.ts b/packages/contract-wrappers/src/fetchers/simple_balance_and_proxy_allowance_fetcher.ts deleted file mode 100644 index 5017d879a..000000000 --- a/packages/contract-wrappers/src/fetchers/simple_balance_and_proxy_allowance_fetcher.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { AbstractBalanceAndProxyAllowanceFetcher } from '@0xproject/order-utils'; -import { BlockParamLiteral } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; - -import { TokenWrapper } from '../contract_wrappers/token_wrapper'; - -export class SimpleBalanceAndProxyAllowanceFetcher implements AbstractBalanceAndProxyAllowanceFetcher { - 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/contract-wrappers/src/fetchers/simple_order_filled_cancelled_fetcher.ts b/packages/contract-wrappers/src/fetchers/simple_order_filled_cancelled_fetcher.ts deleted file mode 100644 index 52d0a100c..000000000 --- a/packages/contract-wrappers/src/fetchers/simple_order_filled_cancelled_fetcher.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { AbstractOrderFilledCancelledFetcher } from '@0xproject/order-utils'; -import { BlockParamLiteral } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; - -import { ExchangeWrapper } from '../contract_wrappers/exchange_wrapper'; - -export class SimpleOrderFilledCancelledFetcher implements AbstractOrderFilledCancelledFetcher { - 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; - } - public async getUnavailableTakerAmountAsync(orderHash: string): Promise<BigNumber> { - const unavailableTakerAmount = await this._exchangeWrapper.getUnavailableTakerAmountAsync(orderHash); - return unavailableTakerAmount; - } - public getZRXTokenAddress(): string { - const zrxToken = this._exchangeWrapper.getZRXTokenAddress(); - return zrxToken; - } -} |