From c8e89cef02faf3d27c12fde713c7c462fd77a4ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Thu, 6 Aug 2026 12:04:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BD=92=E4=B8=80=E5=8C=96=E9=92=B1=E5=8C=85?= =?UTF-8?q?=E5=BF=AB=E7=85=A7=E4=B8=8E=E5=85=85=E5=80=BC=E4=B8=AD=E5=BF=83?= =?UTF-8?q?=E4=BA=A4=E4=BA=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 绑定 snapshot 至 owner lifecycle。 --- .../src/features/app-shell/useAccountWallet.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/ai-game-creator-shell/src/features/app-shell/useAccountWallet.ts b/apps/ai-game-creator-shell/src/features/app-shell/useAccountWallet.ts index 3fc25a6c5..07a633e5f 100644 --- a/apps/ai-game-creator-shell/src/features/app-shell/useAccountWallet.ts +++ b/apps/ai-game-creator-shell/src/features/app-shell/useAccountWallet.ts @@ -198,7 +198,7 @@ export function useAccountWallet(currentUserId: string) { return; } const rechargeLifecycle = rechargeLifecycleRef.current; - const snapshotOwnerUserId = currentUserId; + const walletSnapshot = captureWalletBalanceSnapshot(currentUserId); setSubmittingRechargeProductId(product.productId); setRechargeError(null); try { @@ -208,7 +208,7 @@ export function useAccountWallet(currentUserId: string) { if (rechargeLifecycleRef.current !== rechargeLifecycle) { return; } - applyRechargeContent(snapshotOwnerUserId, response.center); + applyRechargeContent(walletSnapshot, response.center); const nativePayment = response.wechatNativePayment; const codeUrl = nativePayment?.codeUrl?.trim(); const expiresAt = nativePayment?.expiresAt?.trim(); @@ -239,7 +239,7 @@ export function useAccountWallet(currentUserId: string) { return; } const rechargeLifecycle = rechargeLifecycleRef.current; - const snapshotOwnerUserId = currentUserId; + const walletSnapshot = captureWalletBalanceSnapshot(currentUserId); const orderId = nativeRechargePayment.orderId; setNativeRechargePayment((current) => current?.orderId === orderId @@ -251,7 +251,7 @@ export function useAccountWallet(currentUserId: string) { if (rechargeLifecycleRef.current !== rechargeLifecycle) { return; } - applyRechargeContent(snapshotOwnerUserId, response.center); + applyRechargeContent(walletSnapshot, response.center); if (response.order.status === 'paid') { setNativeRechargePayment(null); void onWalletBalanceMayHaveChanged();