diff options
author | Fabio Berger <me@fabioberger.com> | 2017-11-09 07:59:59 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-11-10 03:11:46 +0800 |
commit | a10bb4b2fafd7093811277c50fc29456453e7623 (patch) | |
tree | 35a010178105fca1f43bcec7931ffd857ec759c4 /src | |
parent | c89eec426152d2a65e1b45ad7d7b1fb10917911c (diff) | |
download | dexon-0x-contracts-a10bb4b2fafd7093811277c50fc29456453e7623.tar.gz dexon-0x-contracts-a10bb4b2fafd7093811277c50fc29456453e7623.tar.zst dexon-0x-contracts-a10bb4b2fafd7093811277c50fc29456453e7623.zip |
Add todo comments
Diffstat (limited to 'src')
-rw-r--r-- | src/mempool/event_watcher.ts | 2 | ||||
-rw-r--r-- | src/utils/abi_decoder.ts | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/mempool/event_watcher.ts b/src/mempool/event_watcher.ts index ac07badfe..cb8921cfd 100644 --- a/src/mempool/event_watcher.ts +++ b/src/mempool/event_watcher.ts @@ -47,6 +47,7 @@ export class EventWatcher { this._lastMempoolEvents = pendingEvents; } private async _getMempoolEventsAsync(): Promise<Web3.LogEntry[]> { + // TODO: Allow users to listen to any number of confirmations deep, not just mempool const mempoolFilter = { fromBlock: BlockParamLiteral.Pending, toBlock: BlockParamLiteral.Pending, @@ -54,6 +55,7 @@ export class EventWatcher { const pendingEvents = await this._web3Wrapper.getLogsAsync(mempoolFilter); return pendingEvents; } + // TODO: Let's emit out own LogEntry type that has property isRemoved rather then removed private async _emitDifferencesAsync(logs: Web3.LogEntry[], isRemoved: boolean): Promise<void> { for (const log of logs) { const logEvent = { diff --git a/src/utils/abi_decoder.ts b/src/utils/abi_decoder.ts index 247ba0e5b..840ad9be0 100644 --- a/src/utils/abi_decoder.ts +++ b/src/utils/abi_decoder.ts @@ -10,7 +10,7 @@ export class AbiDecoder { constructor(abiArrays: Web3.AbiDefinition[][]) { _.map(abiArrays, this.addABI.bind(this)); } - // This method can only decode logs from the 0x smart contracts + // This method can only decode logs from the 0x & ERC20 smart contracts public tryToDecodeLogOrNoop<ArgsType extends ContractEventArgs>( log: Web3.LogEntry): LogWithDecodedArgs<ArgsType>|RawLog { const methodId = log.topics[0]; |