Skip to content

Commit 6002763

Browse files
committed
feat(dev): fuzzing screen improvements [skip slack]
1 parent c17a754 commit 6002763

File tree

11 files changed

+887
-322
lines changed

11 files changed

+887
-322
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,3 +227,6 @@ flatpak-build/
227227
**/linux/flutter/generated_plugin_registrant.cc
228228
**/linux/flutter/generated_plugin_registrant.h
229229
**/linux/flutter/generated_plugins.cmake
230+
231+
232+
wallet_fuzzer_data/

cw_bitcoin/lib/bitcoin_wallet_keys.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,9 @@ class BitcoinWalletKeys {
44
final String wif;
55
final String privateKey;
66
final String publicKey;
7+
8+
@override
9+
String toString() {
10+
return 'BitcoinWalletKeys(wif: $wif, privateKey: $privateKey, publicKey: $publicKey)';
11+
}
712
}

cw_core/lib/monero_wallet_keys.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,9 @@ class MoneroWalletKeys {
1313
final String publicSpendKey;
1414
final String privateSpendKey;
1515
final String passphrase;
16+
17+
@override
18+
String toString() {
19+
return 'MoneroWalletKeys(primaryAddress: $primaryAddress, publicViewKey: $publicViewKey, privateViewKey: $privateViewKey, publicSpendKey: $publicSpendKey, privateSpendKey: $privateSpendKey, passphrase: $passphrase)';
20+
}
1621
}

cw_nano/lib/nano_wallet_keys.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,9 @@ class NanoWalletKeys {
22
const NanoWalletKeys({required this.seedKey});
33

44
final String seedKey;
5+
6+
@override
7+
String toString() {
8+
return 'NanoWalletKeys(seedKey: $seedKey)';
9+
}
510
}

cw_zano/lib/model/zano_wallet_keys.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,9 @@ class ZanoWalletKeys {
99
final String privateViewKey;
1010
final String publicSpendKey;
1111
final String privateSpendKey;
12+
13+
@override
14+
String toString() {
15+
return 'ZanoWalletKeys(publicViewKey: $publicViewKey, privateViewKey: $privateViewKey, publicSpendKey: $publicSpendKey, privateSpendKey: $privateSpendKey)';
16+
}
1217
}

lib/src/screens/dev/file_explorer.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ class FileExplorerPage extends BasePage {
697697
children: [
698698
IconButton(
699699
icon: Icon(Icons.arrow_back),
700-
onPressed: () => viewModel.viewMode = ViewMode.comparison, // Go back to comparison list
700+
onPressed: () => viewModel.viewMode = ViewMode.comparison,
701701
tooltip: 'Back to changes list',
702702
),
703703
Expanded(

lib/src/screens/dev/wallet_fuzzer.dart

Lines changed: 0 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ class WalletFuzzerPage extends BasePage {
2020
return Column(
2121
children: [
2222
_buildStatusBar(context),
23-
_buildWalletTypeSelections(context),
2423
Expanded(
2524
child: _buildLogsList(context),
2625
),
@@ -103,52 +102,6 @@ class WalletFuzzerPage extends BasePage {
103102
);
104103
}
105104

106-
Widget _buildWalletTypeSelections(BuildContext context) {
107-
return Observer(
108-
builder: (_) {
109-
return Container(
110-
padding: EdgeInsets.all(8.0),
111-
child: Column(
112-
crossAxisAlignment: CrossAxisAlignment.start,
113-
children: [
114-
Row(
115-
children: [
116-
Text(
117-
'Wallet Types:',
118-
style: TextStyle(fontWeight: FontWeight.bold),
119-
),
120-
Spacer(),
121-
TextButton(
122-
onPressed: () => viewModel.selectAllWalletTypes(),
123-
child: Text('Select All'),
124-
),
125-
TextButton(
126-
onPressed: () => viewModel.deselectAllWalletTypes(),
127-
child: Text('Deselect All'),
128-
),
129-
],
130-
),
131-
Wrap(
132-
spacing: 8.0,
133-
runSpacing: 8.0,
134-
children: viewModel.allTypes.map((type) {
135-
final isSelected = viewModel.typeSelections[type] ?? false;
136-
return FilterChip(
137-
selected: isSelected,
138-
label: Text(type.toString().split('.').last),
139-
onSelected: (_) => viewModel.toggleWalletTypeSelection(type),
140-
checkmarkColor: Theme.of(context).primaryColor,
141-
selectedColor: Theme.of(context).primaryColor.withOpacity(0.2),
142-
);
143-
}).toList(),
144-
),
145-
],
146-
),
147-
);
148-
},
149-
);
150-
}
151-
152105
Widget _buildLogsList(BuildContext context) {
153106
return Container(
154107
padding: EdgeInsets.all(8.0),
@@ -279,54 +232,6 @@ class WalletFuzzerPage extends BasePage {
279232
],
280233
),
281234
SizedBox(height: 8),
282-
Observer(
283-
builder: (_) => CheckboxListTile(
284-
title: Text('Start fuzzing on app boot'),
285-
value: viewModel.autoStartOnBoot,
286-
onChanged: (bool? value) {
287-
if (value != null) {
288-
viewModel.setAutoStartOnBoot(value);
289-
}
290-
},
291-
controlAffinity: ListTileControlAffinity.leading,
292-
contentPadding: EdgeInsets.zero,
293-
),
294-
),
295-
SizedBox(height: 8),
296-
InkWell(
297-
onTap: () {
298-
Clipboard.setData(ClipboardData(text: viewModel.getAdbCommand()));
299-
ScaffoldMessenger.of(context).showSnackBar(
300-
SnackBar(content: Text('ADB script copied to clipboard')),
301-
);
302-
},
303-
child: Container(
304-
padding: EdgeInsets.all(8),
305-
decoration: BoxDecoration(
306-
border: Border.all(color: Colors.grey),
307-
borderRadius: BorderRadius.circular(4),
308-
),
309-
child: Row(
310-
children: [
311-
Icon(Icons.terminal, size: 16),
312-
SizedBox(width: 8),
313-
Expanded(
314-
child: Text(
315-
'Copy ADB Test Script (Run with: bash script.sh)',
316-
style: TextStyle(fontSize: 12),
317-
),
318-
),
319-
Icon(Icons.copy, size: 16),
320-
],
321-
),
322-
),
323-
),
324-
SizedBox(height: 8),
325-
Text(
326-
'Log file: ${viewModel.logFilePath}',
327-
style: TextStyle(fontSize: 10, color: Colors.grey),
328-
overflow: TextOverflow.ellipsis,
329-
),
330235
],
331236
),
332237
);

0 commit comments

Comments
 (0)