Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add events for manually added bills #1008

Merged
merged 1 commit into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/navigation/tabs/shop/bill/components/BillList.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import moment from 'moment';
import {TouchableOpacity} from 'react-native';
import {useTranslation} from 'react-i18next';
import {ActiveOpacity} from '../../../../../components/styled/Containers';
import BillItem from './BillItem';
import {
Expand All @@ -10,8 +11,9 @@ import {
} from '../../../../../store/shop/shop.models';
import {APP_NETWORK} from '../../../../../constants/config';
import {AppActions} from '../../../../../store/app';
import {Analytics} from '../../../../../store/analytics/analytics.effects';
import {useAppDispatch, useAppSelector} from '../../../../../utils/hooks';
import {useTranslation} from 'react-i18next';
import {getBillAccountEventParams} from '../utils';

const sortByAscendingDate = (a: BillPayAccount, b: BillPayAccount) => {
const farIntoTheFuture = moment().add(1, 'year').toDate();
Expand Down Expand Up @@ -119,6 +121,12 @@ export const BillList = ({
],
}),
);
dispatch(
Analytics.track(
'Bill Pay — Viewed Why Is My Bill Connecting',
getBillAccountEventParams(account),
),
);
}
return;
}
Expand Down
13 changes: 8 additions & 5 deletions src/navigation/tabs/shop/bill/screens/ConnectBillsOptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,13 @@ const ConnectBillsOptions = ({
dispatch(Analytics.track('Bill Pay — Clicked Connect My Bills'));
};

const searchBills = () => {
navigation.navigate(BillScreens.CONNECT_BILLS, {
tokenType: 'link',
});
dispatch(Analytics.track('Bill Pay — Clicked Search Bills'));
};

return (
<>
<ScrollView
Expand Down Expand Up @@ -246,11 +253,7 @@ const ConnectBillsOptions = ({
<Button
state={continueButtonState}
onPress={() => {
selectedOption === 'auto'
? verifyUserInfo()
: navigation.navigate(BillScreens.CONNECT_BILLS, {
tokenType: 'link',
});
selectedOption === 'auto' ? verifyUserInfo() : searchBills();
}}
buttonStyle={'primary'}>
{continueButtonState === 'loading' ? t('Loading...') : t('Continue')}
Expand Down