mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-22 10:34:32 +00:00
exception casting
This commit is contained in:
parent
d8f41cccaf
commit
29341fc0b0
1 changed files with 4 additions and 2 deletions
|
@ -213,7 +213,8 @@ class ElectrumX {
|
|||
);
|
||||
|
||||
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) {
|
||||
|
@ -353,7 +354,8 @@ class ElectrumX {
|
|||
(await _rpcClient!.request(request, requestTimeout));
|
||||
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue