diff --git a/lib/electrumx_rpc/electrumx.dart b/lib/electrumx_rpc/electrumx.dart index 6667c3de5..8803f12fa 100644 --- a/lib/electrumx_rpc/electrumx.dart +++ b/lib/electrumx_rpc/electrumx.dart @@ -310,6 +310,13 @@ class ElectrumX { requestID: requestID, command: 'blockchain.headers.subscribe', ); + if (response["result"] == null) { + Logging.instance.log( + "getBlockHeadTip returned null response", + level: LogLevel.Error, + ); + throw 'getBlockHeadTip returned null response'; + } return Map.from(response["result"] as Map); } catch (e) { rethrow;