Skip to content

Commit 68b2e5f

Browse files
committed
chore(session): extract LocalFiat props into trace metadata
Signed-off-by: Brandon McAnsh <[email protected]>
1 parent e3f1d78 commit 68b2e5f

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

apps/flipcash/shared/session/src/main/kotlin/com/flipcash/app/session/internal/RealSessionController.kt

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,11 @@ class RealSessionController @Inject constructor(
463463
tag = "Session",
464464
message = "Pull out cash",
465465
metadata = {
466-
"amount" to bill.amount
466+
"underlying quarks" to bill.amount.underlyingTokenAmount.quarks
467+
"native amount" to bill.amount.nativeAmount.formatted()
468+
"fx" to bill.amount.rate.fx
469+
"currency" to bill.amount.rate.currency.name
470+
"token mint" to bill.amount.mint
467471
},
468472
type = TraceType.User,
469473
)
@@ -582,9 +586,13 @@ class RealSessionController @Inject constructor(
582586
analytics.transfer(AnalyticsEvent.SentCashLink(clipboard = true), amount)
583587
trace(
584588
tag = "Session",
585-
message = "Cash link copied to clipboard",
589+
message = "Cash link copied",
586590
metadata = {
587-
"amount" to amount
591+
"underlying quarks" to amount.underlyingTokenAmount.quarks
592+
"native amount" to amount.nativeAmount.formatted()
593+
"fx" to amount.rate.fx
594+
"currency" to amount.rate.currency.name
595+
"token mint" to amount.mint
588596
},
589597
type = TraceType.User,
590598
)
@@ -598,9 +606,14 @@ class RealSessionController @Inject constructor(
598606
analytics.transfer(AnalyticsEvent.SentCashLink(app = result.to), amount)
599607
trace(
600608
tag = "Session",
601-
message = "Cash link shared with ${result.to}",
609+
message = "Cash link shared",
602610
metadata = {
603-
"amount" to amount
611+
"target" to result.to
612+
"underlying quarks" to amount.underlyingTokenAmount.quarks
613+
"native amount" to amount.nativeAmount.formatted()
614+
"fx" to amount.rate.fx
615+
"currency" to amount.rate.currency.name
616+
"token mint" to amount.mint
604617
},
605618
type = TraceType.User,
606619
)

0 commit comments

Comments
 (0)