diff --git a/CHANGELOG.md b/CHANGELOG.md index 46c0eefe645..b07a0730c4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2729,6 +2729,12 @@ If there are any bugs, improvements, optimizations or any new feature proposal f ## [Unreleased] +### Added + +#### web3-eth + +- `syncing` subscription now supports Besu and Nethermind payload format + ### Changed #### web3-eth diff --git a/packages/web3-eth/src/web3_subscriptions.ts b/packages/web3-eth/src/web3_subscriptions.ts index 5838aa9ce2d..31949fc6883 100644 --- a/packages/web3-eth/src/web3_subscriptions.ts +++ b/packages/web3-eth/src/web3_subscriptions.ts @@ -163,7 +163,7 @@ export class SyncingSubscription extends Web3Subscription<{ this.emit('changed', data); } else { const mappedData: SyncOutput = Object.fromEntries( - Object.entries(data.status).map(([key, value]) => [ + Object.entries(data?.status || data).map(([key, value]) => [ key.charAt(0).toLowerCase() + key.substring(1), value, ]),