fix: 添加钱包状态检查日志用于调试

在 _checkAndStartWalletPolling() 中添加详细日志:
- 打印 isWalletReady, isAccountCreated, _serialNumber 的值
- 打印条件不满足时的原因

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2025-12-22 00:48:36 -08:00
parent 74c78440f7
commit 6a2e0bf4f1
1 changed files with 8 additions and 0 deletions

View File

@ -796,6 +796,11 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
Future<void> _checkAndStartWalletPolling() async {
final authState = ref.read(authProvider);
debugPrint('[ProfilePage] _checkAndStartWalletPolling() called');
debugPrint('[ProfilePage] authState.isWalletReady: ${authState.isWalletReady}');
debugPrint('[ProfilePage] authState.isAccountCreated: ${authState.isAccountCreated}');
debugPrint('[ProfilePage] _serialNumber: $_serialNumber');
//
if (authState.isWalletReady) {
debugPrint('[ProfilePage] Wallet already ready (local), skip polling');
@ -834,6 +839,9 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
//
debugPrint('[ProfilePage] Wallet not ready, starting polling');
await ref.read(walletStatusProvider.notifier).startPolling();
} else {
debugPrint('[ProfilePage] Skip wallet check - conditions not met');
debugPrint('[ProfilePage] isAccountCreated=${authState.isAccountCreated}, serialNumber=$_serialNumber');
}
}