.exception will always be of type Object here as we check for null

This commit is contained in:
julian 2023-09-07 12:16:15 -06:00
parent 796961ddd4
commit 9c648affe8

View file

@ -235,8 +235,7 @@ class ElectrumX {
); );
if (response.exception != null) { if (response.exception != null) {
throw response.exception! throw response.exception!;
as Object; // TODO properly check that .exception is an Object
} }
if (response.data is Map && response.data["error"] != null) { if (response.data is Map && response.data["error"] != null) {
@ -329,8 +328,7 @@ class ElectrumX {
(await _rpcClient!.request(request, requestTimeout)); (await _rpcClient!.request(request, requestTimeout));
if (jsonRpcResponse.exception != null) { if (jsonRpcResponse.exception != null) {
throw jsonRpcResponse.exception! throw jsonRpcResponse.exception!;
as Object; // TODO properly check that .exception is an Object
} }
final response = jsonRpcResponse.data as List; final response = jsonRpcResponse.data as List;