@meshconnect/uwc-core 1.2.3-snapshot.bd9aae7 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -154,14 +154,6 @@ export interface UWCTelemetryEvent {
154
154
  * handoffCovered to avoid double-counting.
155
155
  */
156
156
  handoffCovered?: boolean | undefined
157
- /** `pageVisibleDuringHandoff` only: how long the page was hidden for that segment (ms). */
158
- hiddenMs?: number | undefined
159
- /** Handoff terminals: cumulative time the page was backgrounded during the handoff (ms). */
160
- backgroundedMs?: number | undefined
161
- /** Handoff terminals: how many times the page was backgrounded during the handoff. */
162
- backgroundCount?: number | undefined
163
- /** Handoff terminals, WalletConnect only: relay-socket drops seen while the handoff was pending. */
164
- relayDropCount?: number | undefined
165
157
  }
166
158
 
167
159
  /**
@@ -370,10 +362,7 @@ function buildTelemetryEvent<K extends UWCEventName>(
370
362
  durationMs: d.durationMs,
371
363
  timedOut: d.timedOut,
372
364
  timeoutMs: d.timeoutMs,
373
- targetAlreadyActive: d.targetAlreadyActive,
374
- backgroundedMs: d.backgroundedMs,
375
- backgroundCount: d.backgroundCount,
376
- relayDropCount: d.relayDropCount
365
+ targetAlreadyActive: d.targetAlreadyActive
377
366
  }
378
367
  }
379
368
  case 'walletRejected': {
@@ -392,10 +381,7 @@ function buildTelemetryEvent<K extends UWCEventName>(
392
381
  targetAlreadyActive: d.targetAlreadyActive,
393
382
  errorCode: d.errorCode,
394
383
  failureKind: d.failureKind,
395
- source: d.source,
396
- backgroundedMs: d.backgroundedMs,
397
- backgroundCount: d.backgroundCount,
398
- relayDropCount: d.relayDropCount
384
+ source: d.source
399
385
  }
400
386
  }
401
387
  case 'walletTimedOut': {
@@ -410,10 +396,7 @@ function buildTelemetryEvent<K extends UWCEventName>(
410
396
  handoffId: d.handoffId,
411
397
  durationMs: d.durationMs,
412
398
  timeoutMs: d.timeoutMs,
413
- targetAlreadyActive: d.targetAlreadyActive,
414
- backgroundedMs: d.backgroundedMs,
415
- backgroundCount: d.backgroundCount,
416
- relayDropCount: d.relayDropCount
399
+ targetAlreadyActive: d.targetAlreadyActive
417
400
  }
418
401
  }
419
402
  case 'walletFailed': {
@@ -433,10 +416,7 @@ function buildTelemetryEvent<K extends UWCEventName>(
433
416
  errorCode: d.errorCode,
434
417
  failureKind: d.failureKind,
435
418
  source: d.source,
436
- error: { type: d.error.type, message: scrubMessage(d.error.message) },
437
- backgroundedMs: d.backgroundedMs,
438
- backgroundCount: d.backgroundCount,
439
- relayDropCount: d.relayDropCount
419
+ error: { type: d.error.type, message: scrubMessage(d.error.message) }
440
420
  }
441
421
  }
442
422
  case 'capabilitiesUpdated': {
@@ -468,15 +448,8 @@ function buildTelemetryEvent<K extends UWCEventName>(
468
448
  }
469
449
  case 'pageHiddenDuringHandoff':
470
450
  case 'pageVisibleDuringHandoff': {
471
- // Cast to the visible shape (superset). `hiddenMs` is absent on the hidden
472
- // event undefined dropped by compactUndefined.
473
- const d = data as UWCEventMap['pageVisibleDuringHandoff']
474
- return {
475
- ...base,
476
- handoffId: d.handoffId,
477
- platform: d.platform,
478
- hiddenMs: d.hiddenMs
479
- }
451
+ const d = data as UWCEventMap['pageHiddenDuringHandoff']
452
+ return { ...base, handoffId: d.handoffId, platform: d.platform }
480
453
  }
481
454
  case 'bridgeError': {
482
455
  const d = data as UWCEventMap['bridgeError']
@@ -500,31 +473,6 @@ function buildTelemetryEvent<K extends UWCEventName>(
500
473
  error: { type: d.error.type, message: scrubMessage(d.error.message) }
501
474
  }
502
475
  }
503
- case 'relayDisconnected': {
504
- const d = data as UWCEventMap['relayDisconnected']
505
- // The relay socket dropped. Observational, NOT a failure: a drop only
506
- // matters if a round-trip was in flight — deliberately left without a
507
- // `failureKind` so it never inflates failure metrics. Pair with
508
- // `relayReconnected` (same sdkSessionId) for the dead-window duration.
509
- return {
510
- ...base,
511
- connectionMode: 'walletConnect',
512
- source: 'provider',
513
- ...(d.error
514
- ? {
515
- error: {
516
- type: d.error.type,
517
- message: scrubMessage(d.error.message)
518
- }
519
- }
520
- : {})
521
- }
522
- }
523
- case 'relayReconnected': {
524
- // Socket recovered. Name-only + mode; the diagnostic value is the timestamp
525
- // relative to the paired `relayDisconnected`.
526
- return { ...base, connectionMode: 'walletConnect', source: 'provider' }
527
- }
528
476
  case 'walletConnectInitError': {
529
477
  const d = data as UWCEventMap['walletConnectInitError']
530
478
  // SignClient.init failed — the WC client never came up. Distinct from
@@ -325,17 +325,7 @@ export class UniversalWalletConnector {
325
325
  (error: unknown) =>
326
326
  this.eventManager.emit('walletConnectInitError', {
327
327
  error: toWalletError(error)
328
- }),
329
- // Relay transport dropped — capture the FACT (+ scrubbed reason if any) so a
330
- // socket death during a wallet deep-link is visible, not silent (CARE-263).
331
- (detail: unknown) =>
332
- this.eventManager.emit(
333
- 'relayDisconnected',
334
- detail ? { error: toWalletError(detail) } : {}
335
- ),
336
- // Relay transport recovered — pair with `relayDisconnected` (same
337
- // sdkSessionId) to measure the dead window.
338
- () => this.eventManager.emit('relayReconnected', undefined)
328
+ })
339
329
  )
340
330
  )
341
331
  }