feat: improve tari dev_logs

This commit is contained in:
Konstantin Ullrich 2025-05-13 15:50:56 +02:00
parent 7cbc0b4a45
commit e9468f290a
No known key found for this signature in database
GPG key ID: 6B3199AD9B3D23B8
3 changed files with 7 additions and 8 deletions

View file

@ -251,11 +251,9 @@ abstract class TariWalletBase
Future<void> dev_printLogs() async {
final currentWalletPath =
await pathForWallet(name: walletInfo.name, type: type);
Directory("$currentWalletPath/logs").listSync().forEach((e) => log(e.path));
final stat = await File("$currentWalletPath/logs/wallet.log").stat();
log(stat.size.toString());
File("$currentWalletPath/logs/wallet.0.log").readAsString().then((e) => log(e));
final files = Directory("$currentWalletPath/logs").listSync();
files.forEach((e) => log(e.path));
File(files.last.path).readAsString().then((e) => log(e));
}
@override

View file

@ -73,7 +73,7 @@ class TariWalletService extends WalletService<
try {
final path = await pathForWallet(name: credentials.name, type: getType());
final connection = tariffi.FFITariTransportConfig.tcp("/ip4/127.0.0.1/tcp/9051");
final connection = tariffi.FFITariTransportConfig.tcp("/ip4/0.0.0.0/tcp/9051");
final config = tari.getWalletConfig(
path: path,
transport: connection,
@ -127,7 +127,7 @@ class TariWalletService extends WalletService<
Future<TariWallet> openWallet(String name, String password) async {
try {
final path = await pathForWallet(name: name, type: getType());
final connection = tariffi.FFITariTransportConfig();
final connection = tariffi.FFITariTransportConfig.tcp("/ip4/0.0.0.0/tcp/9051");
final config = tari.getWalletConfig(
path: path,
transport: connection,
@ -233,7 +233,7 @@ class TariWalletService extends WalletService<
try {
final path = await pathForWallet(name: credentials.name, type: getType());
final connection = tariffi.FFITariTransportConfig();
final connection = tariffi.FFITariTransportConfig.tcp("/ip4/0.0.0.0/tcp/9051");
final config = tari.getWalletConfig(
path: path,
transport: connection,

View file

@ -6,6 +6,7 @@ import 'package:cake_wallet/src/screens/base_page.dart';
import 'package:cake_wallet/src/screens/settings/widgets/setting_priority_picker_cell.dart';
import 'package:cake_wallet/src/screens/settings/widgets/settings_cell_with_arrow.dart';
import 'package:cake_wallet/src/screens/settings/widgets/settings_picker_cell.dart';
import 'package:cake_wallet/src/screens/settings/widgets/settings_switcher_cell.dart';
import 'package:cake_wallet/src/screens/settings/widgets/settings_version_cell.dart';
import 'package:cake_wallet/tari/tari.dart';
import 'package:cake_wallet/utils/feature_flag.dart';