Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit ac45058

Browse files
authored
Fix types: returnTransactionObjects param value affects resolve type (#4911)
* returnTransactionObjects val affects resolve type * Update CHANGELOG.md
1 parent 69c0b1a commit ac45058

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,7 @@ Released with 1.0.0-beta.37 code base.
548548
- Fix web3-core-method throws on `f.call = this.call` when intrinsic is frozen (#4918) (#4938)
549549
- Fix static tuple encoding (#4673) (#4884)
550550
- Fix bug in handleRevert logic for eth_sendRawTransaction (#4902)
551+
- Fix resolve type of getBlock function (#4911)
551552

552553
### Changed
553554
- Replace deprecated String.prototype.substr() (#4855)

packages/web3-eth/types/index.d.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,15 +218,24 @@ export class Eth {
218218
getBlock(blockHashOrBlockNumber: BlockNumber | string): Promise<BlockTransactionString>;
219219
getBlock(
220220
blockHashOrBlockNumber: BlockNumber | string,
221-
returnTransactionObjects: boolean
221+
returnTransactionObjects: false
222+
): Promise<BlockTransactionString>;
223+
getBlock(
224+
blockHashOrBlockNumber: BlockNumber | string,
225+
returnTransactionObjects: true
222226
): Promise<BlockTransactionObject>;
223227
getBlock(
224228
blockHashOrBlockNumber: BlockNumber | string,
225229
callback?: (error: Error, block: BlockTransactionString) => void
226230
): Promise<BlockTransactionString>;
227231
getBlock(
228232
blockHashOrBlockNumber: BlockNumber | string,
229-
returnTransactionObjects: boolean,
233+
returnTransactionObjects: false,
234+
callback?: (error: Error, block: BlockTransactionString) => void
235+
): Promise<BlockTransactionString>;
236+
getBlock(
237+
blockHashOrBlockNumber: BlockNumber | string,
238+
returnTransactionObjects: true,
230239
callback?: (error: Error, block: BlockTransactionObject) => void
231240
): Promise<BlockTransactionObject>;
232241

0 commit comments

Comments
 (0)