From 98aab2099d136164fc43700bed410fe0374c2a55 Mon Sep 17 00:00:00 2001 From: Chase Ripplinger Date: Wed, 10 Nov 2021 12:44:28 -0600 Subject: [PATCH] Fix NPE in eth_subscribe --- pkg/transformer/eth_subscribe.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/transformer/eth_subscribe.go b/pkg/transformer/eth_subscribe.go index 1c1b70ad..de32e60d 100644 --- a/pkg/transformer/eth_subscribe.go +++ b/pkg/transformer/eth_subscribe.go @@ -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()) + } }