diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-10-06 18:04:51 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-10-06 18:04:51 +0800 |
commit | 637183e4b214cc7a215ebf83d18c1a65263d8e7e (patch) | |
tree | 2736abe7bb0bde6e68757bf7a07b00d358c289f1 /src/contract_wrappers | |
parent | 44e2929a4c3cec6666a2e3ad340028aff2884f69 (diff) | |
download | dexon-sol-tools-637183e4b214cc7a215ebf83d18c1a65263d8e7e.tar dexon-sol-tools-637183e4b214cc7a215ebf83d18c1a65263d8e7e.tar.gz dexon-sol-tools-637183e4b214cc7a215ebf83d18c1a65263d8e7e.tar.bz2 dexon-sol-tools-637183e4b214cc7a215ebf83d18c1a65263d8e7e.tar.lz dexon-sol-tools-637183e4b214cc7a215ebf83d18c1a65263d8e7e.tar.xz dexon-sol-tools-637183e4b214cc7a215ebf83d18c1a65263d8e7e.tar.zst dexon-sol-tools-637183e4b214cc7a215ebf83d18c1a65263d8e7e.zip |
introduce BlockParamLiteral
Diffstat (limited to 'src/contract_wrappers')
-rw-r--r-- | src/contract_wrappers/contract_wrapper.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/contract_wrappers/contract_wrapper.ts b/src/contract_wrappers/contract_wrapper.ts index 925537173..0b65445c1 100644 --- a/src/contract_wrappers/contract_wrapper.ts +++ b/src/contract_wrappers/contract_wrapper.ts @@ -13,6 +13,7 @@ import { SubscriptionOpts, IndexedFilterValues, EventCallback, + BlockParamLiteral, } from '../types'; import {constants} from '../utils/constants'; import {intervalUtils} from '../utils/interval_utils'; @@ -120,7 +121,7 @@ export class ContractWrapper { delete this._blockAndLogStreamer; } private async _reconcileBlockAsync(): Promise<void> { - const latestBlock = await this._web3Wrapper.getBlockAsync('latest'); + const latestBlock = await this._web3Wrapper.getBlockAsync(BlockParamLiteral.Latest); // We need to coerce to Block type cause Web3.Block includes types for mempool bloks (this._blockAndLogStreamer as BlockAndLogStreamer).reconcileNewBlock(latestBlock as any as Block); } |