mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 20:39:51 +00:00
fix(generic-fixes): Wallet Grouping Bug
Add ability to export hash change logs
This commit is contained in:
parent
dc027d6765
commit
9c8d22842a
2 changed files with 2 additions and 45 deletions
|
@ -36,7 +36,7 @@ import 'package:cake_wallet/src/screens/dashboard/pages/address_page.dart';
|
|||
import 'package:cake_wallet/src/screens/dashboard/pages/nft_details_page.dart';
|
||||
import 'package:cake_wallet/src/screens/dashboard/pages/transactions_page.dart';
|
||||
import 'package:cake_wallet/src/screens/dashboard/sign_page.dart';
|
||||
import 'package:cake_wallet/src/screens/dev/hash_change_log.dart';
|
||||
import 'package:cake_wallet/src/screens/dev/hash_change_logs_page.dart';
|
||||
import 'package:cake_wallet/src/screens/dev/monero_background_sync.dart';
|
||||
import 'package:cake_wallet/src/screens/dev/moneroc_call_profiler.dart';
|
||||
import 'package:cake_wallet/src/screens/dev/print_verbose_logs_page.dart';
|
||||
|
@ -923,7 +923,7 @@ Route<dynamic> createRoute(RouteSettings settings) {
|
|||
);
|
||||
|
||||
case Routes.devHashChangeLogs:
|
||||
return MaterialPageRoute<void>(builder: (_) => HashChangeLogViewerPage());
|
||||
return MaterialPageRoute<void>(builder: (_) => HashChangeLogsPage());
|
||||
|
||||
case Routes.devPrintVerbose:
|
||||
return MaterialPageRoute<void>(builder: (_) => PrintVerboseLogsPage());
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:path/path.dart' as p;
|
||||
|
||||
class HashChangeLogViewerPage extends StatelessWidget {
|
||||
const HashChangeLogViewerPage({super.key});
|
||||
|
||||
Future<String?> loadHashLog() async {
|
||||
final dir = await getApplicationDocumentsDirectory();
|
||||
final file = File(p.join(dir.path, 'hashed_identifier_changes.log'));
|
||||
if (!await file.exists()) return null;
|
||||
return await file.readAsString();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: Text('Hash Change Log')),
|
||||
body: FutureBuilder<String?>(
|
||||
future: loadHashLog(),
|
||||
builder: (context, snap) {
|
||||
if (snap.connectionState != ConnectionState.done) {
|
||||
return Center(child: CircularProgressIndicator());
|
||||
}
|
||||
final text = snap.data;
|
||||
if (text == null || text.isEmpty) {
|
||||
return Center(child: Text('No log records found.'));
|
||||
}
|
||||
return SingleChildScrollView(
|
||||
padding: EdgeInsets.all(16),
|
||||
child: Text(
|
||||
text,
|
||||
style: TextStyle(fontFamily: 'monospace', fontSize: 12),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue