Commit e4206b8
committed
feat(analytics): emit dapp_name + dapp_url on Remote Connection Request Received/Failed
Wire the self-reported dapp identity from the V2 MWP connection request
metadata into both Remote Connection Request analytics events:
- `Remote Connection Request Received` (success path):
populates `dapp_name` / `dapp_url` from `connReq.metadata.dapp.{name,url}`
- `Remote Connection Request Failed` (catch path):
same, using optional chaining so both gracefully degrade to `undefined`
when the failure occurred before `parseConnectionRequest` returned (e.g.
invalid URL, malformed payload)
Pairs with the Consensys/segment-schema PR that declares both fields as
optional `string` properties on the Received and Failed YAMLs. Mirrors
the `dapp_name` / `dapp_url` already emitted on Connect Request
Started/Completed/Cancelled, closing the parity gap on the earliest
wallet-side connection signal so per-dapp drop-off can be measured
before the permission UI.
Tests updated:
- happy-path Received assertion now also expects `dapp_name`/`dapp_url`
- failed-path Failed assertion now also expects `dapp_name`/`dapp_url`
+ `sdk_version`/`sdk_platform` (which were silently being emitted but
never asserted)1 parent f3a256d commit e4206b8
2 files changed
Lines changed: 10 additions & 0 deletions
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
442 | 442 | | |
443 | 443 | | |
444 | 444 | | |
| 445 | + | |
| 446 | + | |
445 | 447 | | |
446 | 448 | | |
447 | 449 | | |
| |||
583 | 585 | | |
584 | 586 | | |
585 | 587 | | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
586 | 592 | | |
587 | 593 | | |
588 | 594 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
| 261 | + | |
| 262 | + | |
261 | 263 | | |
262 | 264 | | |
263 | 265 | | |
| |||
305 | 307 | | |
306 | 308 | | |
307 | 309 | | |
| 310 | + | |
| 311 | + | |
308 | 312 | | |
309 | 313 | | |
310 | 314 | | |
| |||
0 commit comments