From 3d98b0ea880aa3cab889b7b8383acb36b3591cbe Mon Sep 17 00:00:00 2001 From: Brandon McAnsh Date: Fri, 10 Jul 2026 11:45:08 -0400 Subject: [PATCH] fix(analytics): actually put amount properties in asProperties maps 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. --- .../kotlin/com/flipcash/app/analytics/Events.kt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/flipcash/shared/analytics/src/main/kotlin/com/flipcash/app/analytics/Events.kt b/apps/flipcash/shared/analytics/src/main/kotlin/com/flipcash/app/analytics/Events.kt index a4eaca5d4..e7b02f98a 100644 --- a/apps/flipcash/shared/analytics/src/main/kotlin/com/flipcash/app/analytics/Events.kt +++ b/apps/flipcash/shared/analytics/src/main/kotlin/com/flipcash/app/analytics/Events.kt @@ -300,20 +300,20 @@ internal sealed interface AnalyticsEvent { internal fun LocalFiat.asProperties(): Map { return buildMap { putAll(underlyingTokenAmount.asProperties()) - "Fiat" to nativeAmount.decimalValue.toString() - "Exchange Rate" to rate.fx.toString() - "Currency" to rate.currency.name - "Mint" to mint.base58() + put("Fiat", nativeAmount.decimalValue.toString()) + put("Exchange Rate", rate.fx.toString()) + put("Currency", rate.currency.name) + put("Mint", mint.base58()) } } internal fun Fiat.asProperties(): Map { return buildMap { - "Fiat" to decimalValue.toString() - "Currency" to currencyCode.name - "USDC" to decimalValue.toString() - "Quarks" to quarks.toDouble().toString() + put("Fiat", decimalValue.toString()) + put("Currency", currencyCode.name) + put("USDC", decimalValue.toString()) + put("Quarks", quarks.toDouble().toString()) } }