From 188075b2befce7e3da901b479c38686dde4c7870 Mon Sep 17 00:00:00 2001 From: hailin Date: Sun, 21 Dec 2025 20:55:31 -0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=9F=AD=E4=BF=A1=E8=B6=85=E6=97=B6?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E6=88=90=E5=8A=9F=E7=8A=B6=E6=80=81=E9=81=BF?= =?UTF-8?q?=E5=85=8D=E5=89=8D=E7=AB=AF=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 超时情况下短信可能已发送成功,返回 success: true + uncertain: true 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .claude/settings.local.json | 10 +++++- SEED01-qrcode.png | Bin 0 -> 1641 bytes .../external/sms/sms.service.ts | 33 ++++++++++++++++-- .../presentation/pages/deposit_usdt_page.dart | 32 ++++++++++++----- 4 files changed, 63 insertions(+), 12 deletions(-) create mode 100644 SEED01-qrcode.png diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 5058a2d1..66cbf6b9 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -272,7 +272,15 @@ "Bash($env:DATABASE_URL=\"postgresql://postgres:password@localhost:5432/rwa_identity?schema=public\")", "Bash(docker cp:*)", "Bash(timeout 120 docker compose:*)", - "Bash(docker network create:*)" + "Bash(docker network create:*)", + "Bash(find backend/services -type d -name migrations -exec sh -c 'echo \"\"=== {} ===\"\" && ls -1 \"\"$1\"\" | wc -l' _ {} ;)", + "Bash(git commit -m \"$\\(cat <<''EOF''\nrefactor: 简化启动流程和优化向导页文案\n\n- 简化 splash 页面跳转逻辑:账号已创建直接进主页,首次启动进向导页\n- 优化向导页第5页文案:更亲切的标题和更清晰的说明\n- 改进推荐码输入框和扫码图标颜色:黑色文字与白色底色形成更好对比\n- 简化\"恢复账号\"按钮文字\n\n🤖 Generated with [Claude Code]\\(https://claude.com/claude-code\\)\n\nCo-Authored-By: Claude Sonnet 4.5 \nEOF\n\\)\")", + "Bash(timeout 30 git push:*)", + "Bash(ping:*)", + "Bash(ipconfig:*)", + "Bash(flutter run:*)", + "Bash(flutter devices:*)", + "Bash(npx qrcode:*)" ], "deny": [], "ask": [] diff --git a/SEED01-qrcode.png b/SEED01-qrcode.png new file mode 100644 index 0000000000000000000000000000000000000000..7b526361b9f7a6c63ca45c632ed5b95426f33bbf GIT binary patch literal 1641 zcmb7FOK1~O6pac+gjlo$wNVtY24*2No6%aV)%Y2$rb%8z1*sOgauF(u5kd-zt&O&R zhR_5drDiOd`au_6D5X_uL<4SIbf>{+7NUa5##F2E+&5G6T5;jx%_Z-1f9IT=-qwSA ztV?Q_SS%K+ve)H>)o3lQ!gtl^#b%g=imRCg7ksV_zqVMa*3+*qPn-KU>{T~tf<7X%CU0yx)_{D#jQ0Yb{%L?5YSxTf@Y-&c0C>0 z{AoQ*@!f!bMwP-U_9=0P!K)rTA`eaTCO)EqfO{m@K(_p9b|Ls8$bw$O}-P{ zi3>aP3ZAI6CAp>XP9uLRW9>Lx!6|ylU9y4;_ml13b4dg+!AP(fP0VAG`wpaLG+uK} zG)s@|Qdzk5u&LCH61ews-g>=JH$XM}%{zc7H~}*9nhI}v+J=kN1m1X*#`DQh{>U>9 zV3CbyY?N+pZ(3^<(r zu^}qiXkJMXOCG=(orAfyK#H>*?ztjB1)@cuLgY(7pSEemzKB6_RCquNFfbnLZ!Yvj z==H1^WfEGAQ8h77%%R8M=!qKyjInW#(VlilH^D;0A1^U!UfN(m&XpHEYdi(3VkB1bznyO zND$;BkHI8RrS3G%qs!Vu1(hXI7%>MpdPd8@Ks+ivugtknsRQi{C23gX{|pQVh6)sd z;UiM8yb>Zd6h^A>7-Y$|K6)woyXuScGG%Hq=tLc*W@k?e(hVO;2l%L@(d0IVCLkR; zHD_u}vR@ndM5MH1n2Lm30_dAk^rhVu2$uc0FuF;Y4;94Cq4!TyUex`)*xB&y*%1Ca OEXuBfuKPQVpZ^UKD errorInfo.includes(timeout), + ); + } + /** * 睡眠函数 */ diff --git a/frontend/mobile-app/lib/features/deposit/presentation/pages/deposit_usdt_page.dart b/frontend/mobile-app/lib/features/deposit/presentation/pages/deposit_usdt_page.dart index d29c254a..ae336339 100644 --- a/frontend/mobile-app/lib/features/deposit/presentation/pages/deposit_usdt_page.dart +++ b/frontend/mobile-app/lib/features/deposit/presentation/pages/deposit_usdt_page.dart @@ -4,6 +4,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:go_router/go_router.dart'; import 'package:qr_flutter/qr_flutter.dart'; import '../../../../core/di/injection_container.dart'; +import '../../../../core/storage/storage_keys.dart'; /// 充值 USDT 页面 /// 显示用户ID(accountSequence)二维码作为充值地址 @@ -67,14 +68,29 @@ class _DepositUsdtPageState extends ConsumerState { _accountSequence = userSerialNum; - // 检查钱包状态 - try { - final walletInfo = await accountService.getWalletInfo(userSerialNum); - _isWalletReady = walletInfo.isReady; - debugPrint('[DepositUsdtPage] 钱包状态: ${walletInfo.status}, isReady: $_isWalletReady'); - } catch (e) { - debugPrint('[DepositUsdtPage] 获取钱包状态失败: $e'); - _isWalletReady = false; + // 先从本地存储检查钱包状态 + final secureStorage = ref.read(secureStorageProvider); + final cachedWalletReady = await secureStorage.read(key: StorageKeys.isWalletReady); + + if (cachedWalletReady == 'true') { + // 本地已标记为 ready,直接使用 + debugPrint('[DepositUsdtPage] 本地存储显示钱包已就绪'); + _isWalletReady = true; + } else { + // 本地未标记,调用API检查 + try { + final walletInfo = await accountService.getWalletInfo(userSerialNum); + _isWalletReady = walletInfo.isReady; + debugPrint('[DepositUsdtPage] 钱包状态: ${walletInfo.status}, isReady: $_isWalletReady'); + + // 如果API返回ready,保存到本地存储 + if (_isWalletReady) { + await secureStorage.write(key: StorageKeys.isWalletReady, value: 'true'); + } + } catch (e) { + debugPrint('[DepositUsdtPage] 获取钱包状态失败: $e'); + _isWalletReady = false; + } } // 如果钱包已就绪,查询余额和真实钱包地址