Skip to content

Commit

Permalink
Fix NPE in eth_subscribe
Browse files Browse the repository at this point in the history
  • Loading branch information
ripply committed Nov 10, 2021
1 parent ba48916 commit 98aab20
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/transformer/eth_subscribe.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,9 @@ func (p *ETHSubscribe) request(req *eth.EthSubscriptionRequest, notifier *notifi
notifier.ResponseRequired()
id, err := p.NewSubscription(notifier, req)
response := eth.EthSubscriptionResponse(id)
return &response, eth.NewCallbackError(err.Error())
if err == nil {
return &response, nil
} else {
return &response, eth.NewCallbackError(err.Error())
}
}

0 comments on commit 98aab20

Please sign in to comment.