mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 03:49:22 +00:00
print error
This commit is contained in:
parent
6e258db344
commit
6695278957
1 changed files with 8 additions and 1 deletions
|
@ -387,7 +387,14 @@ class ElectrumX {
|
|||
throw jsonRpcResponse.exception!;
|
||||
}
|
||||
|
||||
final response = jsonRpcResponse.data as List;
|
||||
final List<dynamic> response;
|
||||
try {
|
||||
response = jsonRpcResponse.data as List;
|
||||
} catch (_) {
|
||||
throw Exception(
|
||||
"Expected json list but got a map: ${jsonRpcResponse.data}",
|
||||
);
|
||||
}
|
||||
|
||||
// check for errors, format and throw if there are any
|
||||
final List<String> errors = [];
|
||||
|
|
Loading…
Reference in a new issue