diff --git a/.dart_tool/package_config.json b/.dart_tool/package_config.json index ea341c2..8ada983 100644 --- a/.dart_tool/package_config.json +++ b/.dart_tool/package_config.json @@ -27,7 +27,7 @@ }, { "name": "blockchain_utils", - "rootUri": "file:///Users/macbookpro/.pub-cache/hosted/pub.dev/blockchain_utils-3.3.0", + "rootUri": "file:///Users/macbookpro/.pub-cache/hosted/pub.dev/blockchain_utils-3.4.0", "packageUri": "lib/", "languageVersion": "2.15" }, @@ -302,10 +302,10 @@ "languageVersion": "2.15" } ], - "generated": "2024-08-20T05:26:23.184178Z", + "generated": "2024-10-01T08:02:23.426424Z", "generator": "pub", - "generatorVersion": "3.5.0", + "generatorVersion": "3.5.3", "flutterRoot": "file:///Users/macbookpro/Documents/flutter", - "flutterVersion": "3.24.0", + "flutterVersion": "3.24.3", "pubCache": "file:///Users/macbookpro/.pub-cache" } diff --git a/.dart_tool/package_config_subset b/.dart_tool/package_config_subset index fdc9155..632cbd3 100644 --- a/.dart_tool/package_config_subset +++ b/.dart_tool/package_config_subset @@ -14,6 +14,10 @@ async 2.18 file:///Users/macbookpro/.pub-cache/hosted/pub.dev/async-2.11.0/ file:///Users/macbookpro/.pub-cache/hosted/pub.dev/async-2.11.0/lib/ +blockchain_utils +2.15 +file:///Users/macbookpro/.pub-cache/hosted/pub.dev/blockchain_utils-3.4.0/ +file:///Users/macbookpro/.pub-cache/hosted/pub.dev/blockchain_utils-3.4.0/lib/ boolean_selector 2.17 file:///Users/macbookpro/.pub-cache/hosted/pub.dev/boolean_selector-2.1.1/ @@ -190,10 +194,6 @@ yaml 2.19 file:///Users/macbookpro/.pub-cache/hosted/pub.dev/yaml-3.1.2/ file:///Users/macbookpro/.pub-cache/hosted/pub.dev/yaml-3.1.2/lib/ -blockchain_utils -2.15 -file:///Users/macbookpro/Documents/bitcoin/blockchain_utils/ -file:///Users/macbookpro/Documents/bitcoin/blockchain_utils/lib/ xrpl_dart 2.15 file:///Users/macbookpro/Documents/xrpl_dart/ diff --git a/.dart_tool/pub/bin/test/test.dart-3.5.3.snapshot b/.dart_tool/pub/bin/test/test.dart-3.5.3.snapshot new file mode 100644 index 0000000..864d062 Binary files /dev/null and b/.dart_tool/pub/bin/test/test.dart-3.5.3.snapshot differ diff --git a/.dart_tool/test/incremental_kernel.Ly9AZGFydD0yLjE1 b/.dart_tool/test/incremental_kernel.Ly9AZGFydD0yLjE1 index c0aac8d..bbb314a 100644 Binary files a/.dart_tool/test/incremental_kernel.Ly9AZGFydD0yLjE1 and b/.dart_tool/test/incremental_kernel.Ly9AZGFydD0yLjE1 differ diff --git a/.dart_tool/version b/.dart_tool/version index b7bc73b..ffba2c8 100644 --- a/.dart_tool/version +++ b/.dart_tool/version @@ -1 +1 @@ -3.24.0 \ No newline at end of file +3.24.3 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 04c4dfc..3ca6379 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,15 @@ -## 4.6.0 +## 4.7.0 -- Fix parsing of XRPLedgerState model when using WebSocket service. +- Update dependencies. +## 4.6.0 +- Fix parsing of XRPLedgerState model when using WebSocket service. ## 4.5.0 - Update dependencies. - ## 4.4.0 - Update dependencies. diff --git a/example/pubspec.lock b/example/pubspec.lock index 25ad95b..72a22d2 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -20,10 +20,11 @@ packages: blockchain_utils: dependency: "direct main" description: - path: "../../bitcoin/blockchain_utils" - relative: true - source: path - version: "3.3.0" + name: blockchain_utils + sha256: ebb6c336ba0120de0982c50d8bc597cb494a530bd22bd462895bb5cebde405af + url: "https://pub.dev" + source: hosted + version: "3.4.0" boolean_selector: dependency: transitive description: @@ -251,10 +252,10 @@ packages: dependency: transitive description: name: vm_service - sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" url: "https://pub.dev" source: hosted - version: "14.2.4" + version: "14.2.5" web: dependency: transitive description: @@ -277,7 +278,7 @@ packages: path: ".." relative: true source: path - version: "4.5.0" + version: "4.7.0" sdks: dart: ">=3.3.0 <4.0.0" flutter: ">=3.18.0-18.0.pre.54" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 228e0bc..1716a12 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -35,9 +35,9 @@ dependencies: http: ^1.1.2 web_socket_channel: ^2.4.0 asn1lib: ^1.5.0 - # blockchain_utils: ^3.3.0 - blockchain_utils: - path: ../../bitcoin/blockchain_utils + blockchain_utils: ^3.4.0 + # blockchain_utils: + # path: ../../bitcoin/blockchain_utils # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. diff --git a/lib/src/rpc/provider/provider.dart b/lib/src/rpc/provider/provider.dart index 1f4d742..3e7590a 100644 --- a/lib/src/rpc/provider/provider.dart +++ b/lib/src/rpc/provider/provider.dart @@ -213,14 +213,15 @@ class XRPLRpc { Map data, RPCRequestDetails request) { // Check if an error is present in the response if (data["error"] != null) { - final code = (int.tryParse((data['error_code']?.toString()) ?? "0") ?? 0); - final message = (data['error_message'] ?? data["error"]) ?? ""; + final code = int.tryParse( + data['error_code']?.toString() ?? data['code']?.toString() ?? ''); + final message = data['error_message'] ?? data["error"]; // Throw an RPCError with the error details throw RPCError( errorCode: code, - message: message.toString(), - data: data, - request: data["request"] ?? request.params); + message: message?.toString() ?? '', + request: data["request"] ?? request.params, + details: data['error']); } // If no error is present, check for the existence of a "result" field if (data.containsKey("result")) { diff --git a/pubspec.lock b/pubspec.lock index 2d72e99..3010e2e 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -37,10 +37,10 @@ packages: dependency: "direct main" description: name: blockchain_utils - sha256: aebc3a32b927b34f638817c4bfdb85f86a97e6ad35f0cd962660b0c6e8d5c56b + sha256: ebb6c336ba0120de0982c50d8bc597cb494a530bd22bd462895bb5cebde405af url: "https://pub.dev" source: hosted - version: "3.3.0" + version: "3.4.0" boolean_selector: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 08dada6..aed34d7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: xrpl_dart description: Easily sign, create, and send all types of XRP transactions using the xrpl_dart package. Manage your XRP Ledger transactions securely and with ease. -version: 4.6.0 +version: 4.7.0 homepage: "https://github.com/mrtnetwork/xrpl_dart" repository: "https://github.com/mrtnetwork/xrpl_dart" Author: mrhaydari.t@gmail.com @@ -15,7 +15,7 @@ environment: sdk: '>=2.15.0 <4.0.0' dependencies: - blockchain_utils: ^3.3.0 + blockchain_utils: ^3.4.0 # blockchain_utils: # path: ../bitcoin/blockchain_utils