selimaj-devandclaude 140616a3e4 Fix wallet bridge on Firefox: use postMessage instead of CustomEvent
Manual testing on Zen/Firefox surfaced "Uncaught Error: Permission
denied to access property 'id'" the moment the isolated-world relay
dispatched a CustomEvent to the world:'MAIN' injected script. That's
a Firefox-specific Xray-wrapper restriction: a CustomEvent's `detail`
object created in one world can't have its properties read from the
other, even though the event itself fires fine. Chromium doesn't
enforce this, which is why it wasn't caught until testing on the
actual target browser (Zen).

Switched both sides of the bridge (wallet-bridge/inject.ts,
wallet-bridge/relay.ts) to window.postMessage with a `channel` field
and same-window source check, since postMessage structured-clones
its payload across the boundary correctly on both browsers -- the
same approach Phantom's own inpage<->content-script bridge uses.

Also added [nexa/...]-prefixed console.debug breadcrumbs through the
wallet-connect/wallet-bridge/wallet-auth chain, since diagnosing this
without them (previous commit shipped none) took several rounds of
"nothing happened" back and forth.

Still not fully verified end-to-end against live Phantom -- the
crash is fixed, but a full connect -> sign -> verify round trip
hasn't been confirmed yet. See CLAUDE.md.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YXiHuScXrjxBh7yFGAPq3B
2026-09-07 12:59:04 +02:00
2026-09-06 11:44:59 +02:00
2026-09-06 04:27:03 +02:00
2026-09-06 04:27:03 +02:00

copilot

Your blockchain powered Agent to help with your trading emotions

S
Description
The blockchain-powered trading companion that helps you manage the emotional/behavioral side of trading
Readme Apache-2.0
185 KiB
2026-09-09 10:20:36 +00:00
Languages
TypeScript 91.1%
CSS 8.6%
HTML 0.3%