Skip to content

Commit

Permalink
fix: send data to subscription
Browse files Browse the repository at this point in the history
  • Loading branch information
jinoosss committed Nov 27, 2024
1 parent ef59041 commit 1aad6ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions serve/filters/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ func (f *Manager) subscribeToEvents() {
f.subscriptions.sendEvent(filterSubscription.NewHeadsEvent, newBlock.Block)

// Send an event to the `newGasPrice` subscription when creating a block with transactions
if len(newBlock.Results) > 0 {
f.subscriptions.sendEvent(filterSubscription.NewGasPriceEvent, newBlock.Results)
if len(newBlock.Block.Txs) > 0 {
f.subscriptions.sendEvent(filterSubscription.NewGasPriceEvent, newBlock.Block)
}

for _, txResult := range newBlock.Results {
Expand Down

0 comments on commit 1aad6ed

Please sign in to comment.