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

Commit 9edb183

Browse files
authored
Add Support for Nethermind and Besu 'syncing' Subscription Payload Format (#7306)
* Add Support for Nethermind and Besu 'syncing' Subscription Payload Formats * Add CHANGELOG note for PR7306
1 parent 496ed93 commit 9edb183

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2729,6 +2729,12 @@ If there are any bugs, improvements, optimizations or any new feature proposal f
27292729

27302730
## [Unreleased]
27312731

2732+
### Added
2733+
2734+
#### web3-eth
2735+
2736+
- `syncing` subscription now supports Besu and Nethermind payload format
2737+
27322738
### Changed
27332739

27342740
#### web3-eth

packages/web3-eth/src/web3_subscriptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ export class SyncingSubscription extends Web3Subscription<{
163163
this.emit('changed', data);
164164
} else {
165165
const mappedData: SyncOutput = Object.fromEntries(
166-
Object.entries(data.status).map(([key, value]) => [
166+
Object.entries(data?.status || data).map(([key, value]) => [
167167
key.charAt(0).toLowerCase() + key.substring(1),
168168
value,
169169
]),

0 commit comments

Comments
 (0)