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:
parent
74c78440f7
commit
6a2e0bf4f1
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue