Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -377,13 +377,7 @@ enum ScanPolicy {
/// Contains information about electrum & lightwallet_d servers for coins being used
/// in 'Electrum' or 'Light' mode
class ActivationRpcData {
ActivationRpcData({
this.lightWalletDServers,
this.electrum,
this.syncParams,
this.minConnected,
this.maxConnected = 1,
});
ActivationRpcData({this.lightWalletDServers, this.electrum, this.syncParams});

/// Creates [ActivationRpcData] from JSON configuration
factory ActivationRpcData.fromJson(JsonMap json) {
Expand All @@ -398,8 +392,6 @@ class ActivationRpcData {
?.map((e) => ActivationServers.fromJsonConfig(e as JsonMap))
.toList(),
syncParams: json.valueOrNull<dynamic>('sync_params'),
minConnected: json.valueOrNull<int>('min_connected'),
maxConnected: json.valueOrNull<int>('max_connected'),
);
}

Expand All @@ -417,12 +409,6 @@ class ActivationRpcData {
/// - date (a unix timestamp)
final dynamic syncParams;

/// Optional. Minimum required electrum connections.
final int? minConnected;

/// Optional. Maximum electrum connections to establish.
final int? maxConnected;

bool get isEmpty => [lightWalletDServers, electrum, syncParams].every(
Copy link

Copilot AI Jul 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The isEmpty getter logic may be incorrect after removing minConnected and maxConnected fields. The method should verify that all remaining fields are properly checked for emptiness.

Copilot uses AI. Check for mistakes.
(element) =>
element == null &&
Expand All @@ -437,8 +423,6 @@ class ActivationRpcData {
'servers': electrum!.map((e) => e.toJsonRequest()).toList(),
},
if (syncParams != null) 'sync_params': syncParams,
if (minConnected != null) 'min_connected': minConnected,
if (maxConnected != null) 'max_connected': maxConnected,
};
}

Expand Down
Loading