Skip to content

Commit 57a56f6

Browse files
feat(legal): add start consent prompt and log terms metadata on start/bid events
1 parent 874b943 commit 57a56f6

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

App.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,13 @@ const App: React.FC = () => {
125125

126126
const handleStart = async () => {
127127
const startTime = Date.now();
128+
if (isRemote && isHost) {
129+
const ok = window.confirm(
130+
'By starting, participants acknowledge this is a live auction workflow. Legal enforceability may require separate signed terms.',
131+
);
132+
if (!ok) return;
133+
}
134+
128135
if (isRemote) {
129136
try {
130137
await syncService.sendEvent({ type: 'START', startTime, startPrice: config.startPrice });

services/syncService.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,17 @@ class SyncService {
243243

244244
await this.writeRoomState(roomId, nextState);
245245

246+
const legalMeta =
247+
event.type === 'START' || event.type === 'BID'
248+
? { termsVersion: 'v0.1', consentAt: Date.now() }
249+
: {};
250+
246251
await supabase.from('auction_events').insert({
247252
room_id: roomId,
248253
event_type: event.type,
249254
payload: {
250255
...event,
256+
...legalMeta,
251257
eventSeq: nextSeq,
252258
actorUserId: this.currentUserId,
253259
},

0 commit comments

Comments
 (0)