修复兼容钱包总额展示

向个人中心和图片画板传递 owner 匹配的 legacy 总额

保持钱包分桶与账单明细为空避免伪造数据

补充个人中心和图片画板回归测试及契约文档
This commit is contained in:
2026-08-07 10:27:37 +08:00
parent ab66a50cfa
commit 58bf56ec56
9 changed files with 90 additions and 10 deletions
@@ -287,6 +287,9 @@ export function PlatformEntryFlowShellImpl({
requestLogin: () => authUi?.openLoginModal(),
currentUser: authUi?.user,
});
const legacyWalletBalance = walletOwnerMatchesCurrentUser
? (profileCenter.rechargeCenter?.walletBalance ?? null)
: null;
const openCreation = useCallback(() => {
if (!isDesktopLayout) {
@@ -362,6 +365,7 @@ export function PlatformEntryFlowShellImpl({
<div className="image-editor-stage-shell flex h-full min-h-0 min-w-0 flex-col overflow-hidden">
<Suspense fallback={<LoadingPanel label="正在加载编辑器..." />}>
<ImageCanvasEditorView
legacyWalletBalance={legacyWalletBalance}
onProjectAccessLost={replaceWithProjectGallery}
/>
</Suspense>
@@ -370,9 +374,6 @@ export function PlatformEntryFlowShellImpl({
}
const isAuthenticated = Boolean(authUi?.user);
const legacyWalletBalance = walletOwnerMatchesCurrentUser
? (profileCenter.rechargeCenter?.walletBalance ?? null)
: null;
const balance = mudPointBalance?.totalPoints ?? legacyWalletBalance;
const isCreationStage =
!isProfileStage &&
@@ -543,6 +544,7 @@ export function PlatformEntryFlowShellImpl({
dashboard={dashboard}
isLoadingDashboard={isLoadingDashboard}
isLoadingWalletBalance={mudPointBalanceStatus === 'loading'}
legacyWalletBalance={legacyWalletBalance}
mudPointBalance={mudPointBalance}
user={authUi?.user}
onLogin={() => authUi?.openLoginModal()}