-
Notifications
You must be signed in to change notification settings - Fork 9
sync dev #256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sync dev #256
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,24 +1,107 @@ | ||||||
| import 'package:komodo_defi_types/komodo_defi_type_utils.dart'; | ||||||
| import 'package:komodo_defi_types/komodo_defi_types.dart'; | ||||||
| import 'package:logging/logging.dart'; | ||||||
|
|
||||||
| class KdfApiClient implements ApiClient { | ||||||
| KdfApiClient( | ||||||
| this._rpcCallback, | ||||||
| // this. | ||||||
| /*{required String rpcPassword}*/ | ||||||
| ); | ||||||
| ) { | ||||||
| _logger = Logger('KdfApiClient'); | ||||||
| } | ||||||
|
|
||||||
| final JsonMap Function(JsonMap) _rpcCallback; | ||||||
| // final Future<StopStatus> Function() _stopCallback; | ||||||
|
|
||||||
| // String? _rpcPassword; | ||||||
|
|
||||||
| late final Logger _logger; | ||||||
|
|
||||||
| /// Enable debug logging for RPC calls (method names, durations, success/failure) | ||||||
| /// This can be controlled via app configuration | ||||||
| static bool enableDebugLogging = true; | ||||||
|
||||||
| static bool enableDebugLogging = true; | |
| static bool enableDebugLogging = false; |
Copilot
AI
Oct 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The response from _rpcCallback is not being awaited. Since executeRpc is declared as async and returns Future<JsonMap>, this synchronous call will cause the stopwatch timing and subsequent logging to execute before the RPC call completes. Change to final response = await _rpcCallback(request);.
Copilot
AI
Oct 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cannot pass response (of type JsonMap) to _logElectrumConnectionInfo which expects JsonMap as its second parameter, but response here is a Future<JsonMap> since line 40 is not awaited. This will cause a type error at runtime.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -76,6 +76,9 @@ class BalanceManager implements IBalanceManager { | |||||
| final KomodoDefiLocalAuth _auth; | ||||||
| StreamSubscription<KdfUser?>? _authSubscription; | ||||||
| final Duration _defaultPollingInterval = const Duration(seconds: 30); | ||||||
|
|
||||||
| /// Enable debug logging for balance polling | ||||||
| static bool enableDebugLogging = true; | ||||||
|
||||||
| static bool enableDebugLogging = true; | |
| static bool enableDebugLogging = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debug logging is enabled by default in production code. Consider setting this to
falseby default to prevent performance degradation and log clutter in production.