npm @formo/analytics 1.36.0
v1.36.0

latest release: 1.37.0
4 hours ago

Minor release: ten fix/refactor PRs plus new capture surface since 1.35.2.

New

  • EIP-5792 batched calls are captured (#355). Smart accounts send through wallet_sendCalls, which the SDK previously ignored entirely. One transaction event per call, because the call is the unit of attribution: each carries its own to, value and data, plus batch_size, batch_index and the wallet's batch_id from broadcast onward. (An atomic batch lands as one on-chain transaction, the non-atomic fallback as several — distinct batch_id counts wallet actions, distinct transaction_hash counts on-chain transactions.) Status resolves per batch via wallet_getCallsStatus; a per-call receipt outranks the batch verdict.

Fixed

  • personal_sign capture worked in no real browser (#355). The message was decoded with Node's Buffer, which has no polyfill in the bundle, so the line threw and the signature event was silently dropped. Now TextDecoder, verified against a real MetaMask extension in Chrome.
  • A torn-down instance can no longer send (#345). The event queue is closed on cleanup, not merely cleared; page-leave listeners and receipt/batch polls are released with it. Closes #339, #344, #338.
  • Wallet transitions are ordered, not guarded case by case (#350). Every wallet signal takes a ticket before its first await; a handler that resumes to find a newer observation abandons what it captured. Fixes the dropped-reconnect race and its siblings. Closes #341.
  • Provider handler ordering (#355): a background EVM wallet's chain change no longer wipes the tracked wallet while Solana holds the slot; a stalled connect cannot restore an address an account switch replaced; a mid-probe wallet switch no longer emits a false disconnect for the wallet that overtook it.
  • Registry fixes (#352): the cached address answers only for the active provider (was misattributing identify() scans), and a listener that fails to detach is retained for retry. Closes #351.

Internal

  • FormoAnalytics split into owned collaborators (#346, #348, #349, #353, #354): TrackingPolicy, WalletStateStore, EvmProviderRegistry, EvmEventTracker, EvmRequestTracker. 3586 → 1647 lines, behaviour verified unchanged at each step. Closes #336.
  • Bundle budget raised to 55 kB and enforced in CI (#347). A headless browser harness over EIP-6963 (#357) runs the built bundle in a real browser; reintroducing the Buffer bug fails it.

Compatibility

No public API change: module exports and IFormoAnalytics are identical to 1.35.2; every removed class member was private. 38 end-to-end comparisons against 1.35.2 across both wallet paths produce identical event streams. Subscriptions (EIP-1193 events, wagmi store + caches) are wired identically. personal_sign in browsers and EIP-5792 capture are strictly additive.

Known

  • #356: a transaction dismissed from MetaMask's pre-confirmation alert screen never reaches a terminal status (MetaMask does not reject the pending RPC from that screen). Found during real-wallet testing; not a regression.

What's Changed

  • fix: lifecycle hardening (close the event queue, order wallet transitions, unhang the suite) by @yosriady in #345
  • chore: raise the bundle budget to 55 kB and make CI enforce it by @yosriady in #347
  • refactor: extract the tracking gates into TrackingPolicy by @yosriady in #346
  • refactor: extract wallet identity and chain state into WalletStateStore by @yosriady in #348
  • refactor: extract the EVM provider registry by @yosriady in #349
  • fix: order wallet transitions instead of guarding them case by case by @yosriady in #350
  • fix: scope the address cache to the active provider, and retain listeners that would not detach by @yosriady in #352
  • refactor: move the EIP-1193 event handlers into EvmEventTracker by @yosriady in #353
  • refactor: move signature and transaction autocapture into EvmRequestTracker by @yosriady in #354
  • feat: capture EIP-5792 batched calls, one event per call by @yosriady in #355
  • test: a headless browser harness over EIP-6963, with no new dependencies by @yosriady in #357
  • chore(release): 1.36.0 by @yosriady in #358

Full Changelog: v1.35.2...v1.36.0

CDN

<script src="https://cdn.formo.so/analytics@1.36.0" integrity="sha384-ki9ARg1LnWlRwkRRhK75X0CVcI9cJggFfQekfAO9Z/jn9TfBG9wpKeBrZd/aWjG9" crossorigin="anonymous"></script>

Don't miss a new analytics release

NewReleases is sending notifications on new releases.