diff --git a/backend/mpc-system/services/service-party-app/src/pages/Home.tsx b/backend/mpc-system/services/service-party-app/src/pages/Home.tsx index 57a0ebec..504964d5 100644 --- a/backend/mpc-system/services/service-party-app/src/pages/Home.tsx +++ b/backend/mpc-system/services/service-party-app/src/pages/Home.tsx @@ -221,7 +221,7 @@ export default function Home() {
参与方 - {share.metadata.participants.length} 人 + {(share.metadata?.participants || []).length} 人
diff --git a/backend/mpc-system/services/service-party-app/src/pages/Session.tsx b/backend/mpc-system/services/service-party-app/src/pages/Session.tsx index 84c70734..a8fc8454 100644 --- a/backend/mpc-system/services/service-party-app/src/pages/Session.tsx +++ b/backend/mpc-system/services/service-party-app/src/pages/Session.tsx @@ -187,10 +187,10 @@ export default function Session() { {/* 参与方列表 */}

- 参与方 ({session.participants.length} / {session.threshold.n}) + 参与方 ({(session.participants || []).length} / {session.threshold.n})

- {session.participants.map((participant, index) => ( + {(session.participants || []).map((participant, index) => (
#{index + 1} @@ -201,10 +201,10 @@ export default function Session() {
))} - {Array.from({ length: session.threshold.n - session.participants.length }).map((_, index) => ( + {Array.from({ length: Math.max(0, session.threshold.n - (session.participants || []).length) }).map((_, index) => (
- #{session.participants.length + index + 1} + #{(session.participants || []).length + index + 1} 等待加入...