Skip to content

fix(analytics): actually put amount properties in asProperties maps#1068

Merged
bmc08gt merged 1 commit into
code/cashfrom
fix/analytics-amount-properties
Jul 10, 2026
Merged

fix(analytics): actually put amount properties in asProperties maps#1068
bmc08gt merged 1 commit into
code/cashfrom
fix/analytics-amount-properties

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fiat.asProperties() and LocalFiat.asProperties() in shared/analytics built their entries with bare "key" to value expressions inside buildMap — creating Pairs and immediately discarding them instead of calling put(). Both helpers returned empty maps.

As a result, every analytics event that attaches an amount has been reaching Mixpanel with no amount data at all:

  • All transfer() events — Grab Bill, Give Bill, Withdrawal, Sent Cash, Send/Receive Cash Link — missing Fiat/Currency/USDC/Quarks (and Exchange Rate/Mint for local fiat amounts)
  • Onramp purchase events (Invoke Payment, Completed)
  • Wallet events (Wallet: Request Amount)

Fix

Use put() inside buildMap. No call-site changes — properties flow through the existing track() plumbing.

Testing

  • :apps:flipcash:shared:analytics compiles and unit tests pass

Fiat.asProperties() and LocalFiat.asProperties() built pairs with bare
`to` expressions inside buildMap without put(), so the resulting maps
were empty and every transfer/onramp/wallet event was sent to Mixpanel
without Fiat/Currency/USDC/Quarks (and Exchange Rate/Mint) properties.
@github-actions github-actions Bot added the type: fix Bug fix label Jul 10, 2026
@bmc08gt bmc08gt merged commit 7be4109 into code/cash Jul 10, 2026
3 checks passed
@bmc08gt bmc08gt deleted the fix/analytics-amount-properties branch July 10, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant