Skip to content

Commit 864f00c

Browse files
committed
chore: only fire openOnRamp if using coinbase quick modal
Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
1 parent e8b4e40 commit 864f00c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/flipcash/features/cash/src/main/kotlin/com/flipcash/app/cash/internal/CashScreenViewModel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,9 +316,9 @@ internal class CashScreenViewModel @Inject constructor(
316316
.filterIsInstance<Event.AddCashToWallet>()
317317
.map { it.amount }
318318
.onEach { amount ->
319-
analytics.openOnramp(AnalyticsEvent.OnRampOpenEvent.Give)
320319
val provider = stateFlow.value.preferredOnRampProvider
321320
if (provider is OnRampProvider.Coinbase && provider.type == OnRampType.Virtual) {
321+
analytics.openOnramp(AnalyticsEvent.OnRampOpenEvent.Give)
322322
// has coinbase provider supporting google pay - pop selection for quick add
323323
dispatchEvent(Event.OpenOnRampAmountModal(amount))
324324
} else {

0 commit comments

Comments
 (0)