Avoiding crash when trying to track payment vault selection on only credit card
@@ -250,6 +250,7 @@ public class PaymentVaultActivity extends MercadoPagoBaseActivity implements Pay
@Override
public void trackChildrenScreen() {
PaymentMethodSearchItem selectedItem = mPaymentVaultPresenter.getSelectedSearchItem();
+ if (selectedItem != null) {
String selectedItemId = selectedItem.getId();
MPTrackingProvider mpTrackingProvider = new MPTrackingProvider.Builder()
@@ -268,6 +269,7 @@ public class PaymentVaultActivity extends MercadoPagoBaseActivity implements Pay
}
mpTrackingProvider.addTrackEvent(event);
}
+ }
private void showTimer() {
if (CheckoutTimer.getInstance().isTimerEnabled()) {
