Skip to content

Commit

Permalink
Update electrum_api_provider.dart
Browse files Browse the repository at this point in the history
  • Loading branch information
mrtnetwork committed Feb 27, 2024
1 parent 8334cdd commit 14ef80f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/src/provider/api_provider/electrum_api_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ class ElectrumApiProvider {
dynamic _findResult(
Map<String, dynamic> data, ElectrumRequestDetails request) {
if (data["error"] != null) {
final code = int.parse(((data["error"]?['code']?.toString()) ?? "0"));
final code =
int.tryParse(((data["error"]?['code']?.toString()) ?? "0")) ?? 0;
final message = data["error"]?['message'] ?? "";
throw RPCError(
errorCode: code,
Expand Down

0 comments on commit 14ef80f

Please sign in to comment.