diff options
author | Leonid <logvinov.leon@gmail.com> | 2017-12-19 19:10:59 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-19 19:10:59 +0800 |
commit | 04268d7f4b4a8a3496518a450bfcf01bb056a57e (patch) | |
tree | 089c743f946ff175838b4ee3142d5ead1aecdc0c /packages/0x.js/src/contract_wrappers/exchange_wrapper.ts | |
parent | c63f76dde7267c54328d2f12f401d94484e5a91a (diff) | |
parent | 156dae1d33bd0a19c764262fbf0c9d6743425fc6 (diff) | |
download | dexon-sol-tools-04268d7f4b4a8a3496518a450bfcf01bb056a57e.tar dexon-sol-tools-04268d7f4b4a8a3496518a450bfcf01bb056a57e.tar.gz dexon-sol-tools-04268d7f4b4a8a3496518a450bfcf01bb056a57e.tar.bz2 dexon-sol-tools-04268d7f4b4a8a3496518a450bfcf01bb056a57e.tar.lz dexon-sol-tools-04268d7f4b4a8a3496518a450bfcf01bb056a57e.tar.xz dexon-sol-tools-04268d7f4b4a8a3496518a450bfcf01bb056a57e.tar.zst dexon-sol-tools-04268d7f4b4a8a3496518a450bfcf01bb056a57e.zip |
Merge pull request #272 from 0xProject/fix/subscription-opts
Rename SubscriptionOpts to BlockRange
Diffstat (limited to 'packages/0x.js/src/contract_wrappers/exchange_wrapper.ts')
-rw-r--r-- | packages/0x.js/src/contract_wrappers/exchange_wrapper.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts b/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts index 3ca5695c4..df793aa06 100644 --- a/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts +++ b/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts @@ -7,6 +7,7 @@ import * as Web3 from 'web3'; import {artifacts} from '../artifacts'; import { BlockParamLiteral, + BlockRange, DecodedLogArgs, ECSignature, EventCallback, @@ -25,7 +26,6 @@ import { OrderTransactionOpts, OrderValues, SignedOrder, - SubscriptionOpts, ValidateOrderFillableOpts, } from '../types'; import {AbiDecoder} from '../utils/abi_decoder'; @@ -616,20 +616,20 @@ export class ExchangeWrapper extends ContractWrapper { /** * Gets historical logs without creating a subscription * @param eventName The exchange contract event you would like to subscribe to. - * @param subscriptionOpts Subscriptions options that let you configure the subscription. + * @param blockRange Block range to get logs from. * @param indexFilterValues An object where the keys are indexed args returned by the event and * the value is the value you are interested in. E.g `{_from: aUserAddressHex}` * @return Array of logs that match the parameters */ public async getLogsAsync<ArgsType extends ExchangeContractEventArgs>( - eventName: ExchangeEvents, subscriptionOpts: SubscriptionOpts, indexFilterValues: IndexedFilterValues, + eventName: ExchangeEvents, blockRange: BlockRange, indexFilterValues: IndexedFilterValues, ): Promise<Array<LogWithDecodedArgs<ArgsType>>> { assert.doesBelongToStringEnum('eventName', eventName, ExchangeEvents); - assert.doesConformToSchema('subscriptionOpts', subscriptionOpts, schemas.subscriptionOptsSchema); + assert.doesConformToSchema('blockRange', blockRange, schemas.blockRangeSchema); assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema); const exchangeContractAddress = this.getContractAddress(); const logs = await this._getLogsAsync<ArgsType>( - exchangeContractAddress, eventName, subscriptionOpts, indexFilterValues, artifacts.ExchangeArtifact.abi, + exchangeContractAddress, eventName, blockRange, indexFilterValues, artifacts.ExchangeArtifact.abi, ); return logs; } |