Skip to content

feat(analytics): send the shared catalogue's money, Wallet and onramp events - #1195

Merged
bmc08gt merged 3 commits into
mainfrom
feat/analytics-catalogue-parity
Nov 2, 2026
Merged

bmc08gt merged 3 commits into
mainfrom
feat/analytics-catalogue-parity

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

iOS now sends the shared catalogue's form of the money, Wallet and onramp events, so Mixpanel can chart iOS and Android in one series. Every send goes through the SharedCore 0.18.0 builders (the pin on main).

Three commits: events iOS never sent, the amount group on money events, and the Wallet events.

Token Purchase and Token Sell now mean "submitted". They fired when the swap finished; they now fire on the submit result, as Android's SwapViewModel.trackTransaction does. A dashboard comparing before and after this release will see that shift.

Wallet: Request Amount sent Fiat 0. sendUsdcToUsdfSignRequest valued the USDC with ExchangedFiat.compute, which treats any non-USDF mint as bonded and returns zero with no supply. TokenAmount.decimalValue is no fix either: mintDecimals is 10 for every non-USDF mint, USDC included. WalletConnection.usdValue(of:) now uses USDC's 6 decimals. The same zero went into the "Requested USDC→USDF deposit swap" log line.

Event Android iOS State
Token Purchase With Coinbase SwapEvents.purchase, placeOrderAndStartPayment result CoinbaseDepositOperation.trackPurchase → Analytics.tokenPurchase sent
Token Purchase With Phantom never sent: the Phantom path skips trackTransaction (SwapViewModelErrorTest expects Reserves) — not wired: Android doesn't send it
Token Purchase With Reserves / Currency SwapEvents.purchase, trackTransaction SwapCompletionReporter.trackSubmit → Analytics.tokenPurchase sent, at submit
Token Sell SwapEvents.sell, trackTransaction SwapCompletionReporter.trackSubmit → Analytics.tokenSell sent, at submit, with Fee
Onramp: Show Verification Info OnrampEvents on the intro screen OnrampVerificationIntroScreen .task → Analytics.onrampStep(.showInfo) sent
Create Account Payment account-creation in-app purchase — not wired: Android sends it from Play Billing; iOS has no StoreKit purchase
Button: Buy With Coinbase / Phantom ButtonEvents.tapped on picking a method with an amount AddMoneyAmountViewModel, next to Amount Confirmed sent
Button: Buy With Other Wallet same, only with a purchase amount — not wired: iOS's Other Wallet never reaches amount entry
Button: Allow / Skip Contacts onboarding contacts step — not wired: iOS asks for contacts in the app, with no Skip
Token Info: Opened From Chat Gate chat gate — not wired: iOS's chat gate never opens Token Info
Deeplink: Parse (failure) DeeplinkEvents.parseFailed, scanner ScanViewModel.isUnparseableQR → Analytics.deeplinkParseFailed sent with drift: Android fires per analysed frame, iOS once per code within the camera's dedup window
Withdrawal, Sent Tip, Give Bill, Receive Cash Link TransferEvents.* Analytics.transfer / Analytics.withdrawal sent
Grab Bill TransferEvents.grabBill Analytics.transfer sent; Grab Time in ms; a failure with only the fiat sends Fiat, Currency, USDC, Quarks
Send Cash Link TransferEvents.sendCashLink Analytics.transfer sent with drift: no Cash Link Choice or App
Tip Received ChatEvents.tipReceived Analytics.tipReceived sent
Add Money: Amount Confirmed / Payment Invoked AddMoneyEvents.* Analytics.addMoneyAmountConfirmed / addMoneyPaymentInvoked sent; Payment Invoked with drift: Android's USDC carries the native amount
Add Money AddMoneyEvents.result Analytics.addMoney sent; a Phantom failure sends no amount, as in handlePhantomError
Wallet: Connect WalletEvents.connect after connecting Analytics.walletConnected, when Phantom returns a session sent
Wallet: Cancel WalletEvents.cancel on a user reject Analytics.walletCancelled, on code 4001 only sent
Wallet: Transactions Failed FailedToSendTransaction, a send failure other than an expired blockhash PhantomDepositOperation simulate or send refusal, other than an expired blockhash sent
Wallet: Request Amount WalletEvents.requestAmount with the USDC amount Analytics.walletRequestAmount sent

Dropped because the builders can't carry them: State, Payment Mint and Payment Token Symbol on Token Purchase; State on Token Sell. Gallery Scan: Succeeded / Failed already shipped in #1170, so there was nothing to rename. Create Account keeps Owner Public Key; it is untouched here.

Adds Token Purchase With Coinbase at the order's outcome, Onramp: Show
Verification Info on the intro screen, the Buy With Coinbase and Buy With
Phantom buttons at amount confirm, and Deeplink: Parse's failure form for a
scanned code that is no Flipcash link. Each fires where Android's does.
Withdrawal, the transfer events, Tip Received, the Add Money steps, Token
Purchase and Token Sell now go through the shared builders, so each sends
Fiat, Currency, USDC and Quarks, plus Exchange Rate and Mint when known.
Grab Time is sent in ms.

Token Purchase and Token Sell now fire on the submit result, as Android's
do, instead of when the swap finishes; a convert reports as a sell of its
source. State, Payment Mint and the completion-time sends are gone. A
Phantom Add Money failure sends no amount, as on Android.
…droid does

Every Wallet event now goes through the shared builders with Provider
Phantom. Wallet: Connect fires once Phantom returns a session instead of on
the request, and Wallet: Cancel only on a user reject (4001).

Wallet: Transactions Failed is new: it fires when the chain refuses a
transaction Phantom signed, at simulation or send, except for an expired
blockhash, matching Android's send failure.

Wallet: Request Amount sent Fiat 0: ExchangedFiat.compute values USDC as a
bonded mint with no supply and returns zero. It now sends the USDC amount in
USD, valued with USDC's 6 decimals.
@bmc08gt bmc08gt self-assigned this Nov 2, 2026
@bmc08gt
bmc08gt marked this pull request as ready for review November 2, 2026 16:58
@bmc08gt
bmc08gt merged commit cef4874 into main Nov 2, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant