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