From a7b5dea0e98c0b7742c2477c511cb16acc1f27c2 Mon Sep 17 00:00:00 2001 From: Nazar Hussain Date: Tue, 20 Sep 2022 17:31:28 +0200 Subject: [PATCH] Update index.d.ts (#5260) * Update CHANGELOG.md * Update index.d.ts (#4955) this callback returns an array of event data Co-authored-by: Oleksii Kosynskyi Co-authored-by: Nazar Hussain Co-authored-by: Nikos Iliakis * Update CHANGELOG.md * Update CHANGELOG.md Co-authored-by: Junaid <86780488+jdevcs@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Muhammad Altabba <24407834+Muhammad-Altabba@users.noreply.github.com> * fix CHANGELOG Co-authored-by: bigbizze <42508203+bigbizze@users.noreply.github.com> Co-authored-by: Oleksii Kosynskyi Co-authored-by: Nikos Iliakis Co-authored-by: Junaid <86780488+jdevcs@users.noreply.github.com> Co-authored-by: Muhammad Altabba <24407834+Muhammad-Altabba@users.noreply.github.com> Co-authored-by: Alex --- CHANGELOG.md | 6 +++++- packages/web3-eth-contract/types/index.d.ts | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54910fd2d0f..1e0f07f18ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -602,5 +602,9 @@ Released with 1.0.0-beta.37 code base. - Support of `safe` and `finalized` block tags added (#5410) ## [Unreleased] +## [1.8.1] +### Fixed +- Fixed types for getPastEvents (#4955) (#5260) + + -## [1.8.1] \ No newline at end of file diff --git a/packages/web3-eth-contract/types/index.d.ts b/packages/web3-eth-contract/types/index.d.ts index c0658e0a366..5abc6fe0ed4 100644 --- a/packages/web3-eth-contract/types/index.d.ts +++ b/packages/web3-eth-contract/types/index.d.ts @@ -68,12 +68,12 @@ export class Contract { getPastEvents( event: string, options: PastEventOptions, - callback: (error: Error, event: EventData) => void + callback: (error: Error, events: EventData[]) => void ): Promise; getPastEvents(event: string, options: PastEventOptions): Promise; getPastEvents( event: string, - callback: (error: Error, event: EventData) => void + callback: (error: Error, events: EventData[]) => void ): Promise; }