refactor(orders): replace local state machine with minimal cache

Strip store/orders.ts to a thin local cache with setOrders and
updateOrder only. Remove all client-side state transition logic,
actor validation, chat sync, notification generation, and wallet
integration — these are now handled by the backend API.

Fix components/order-actions.tsx and stores that depended on
the removed order store methods (markDisputed, autoTimeout*).
This commit is contained in:
zetaloop
2026-05-01 04:13:55 +08:00
parent 452004b194
commit cf0fea9926
6 changed files with 135 additions and 505 deletions
-5
View File
@@ -108,11 +108,6 @@ export const useDisputeStore = create<DisputeState>((set, get) => {
return { decision: deny(403, "仅订单参与方可发起争议") }
}
const markResult = useOrderStore.getState().markDisputed(input.orderId, actor)
if (!markResult.decision.ok) {
return { decision: markResult.decision }
}
const createdAt = new Date().toISOString()
const dispute: DisputeRecord = {
id: generateId("disp"),