Skip to content

Commit

Permalink
chore(IT Wallet): [SIW-1889] Rename newWallet feature to wallet (#…
Browse files Browse the repository at this point in the history
…6490)

## Short description
This PR moves everything under `ts/features/newWallet` to
`ts/features/wallet`

## List of changes proposed in this pull request
- Rename `ts/features/newWallet` to `ts/features/wallet`
- Renamed exported types and components from `NewWallet*` to `Wallet*`

## How to test
Check that everything related to the wallet section works as expected
(cards, onboarding, navigation)
  • Loading branch information
mastro993 authored Dec 4, 2024
1 parent d1df844 commit 25bb1c1
Show file tree
Hide file tree
Showing 60 changed files with 36 additions and 36 deletions.
4 changes: 2 additions & 2 deletions ts/features/bonus/cgn/components/CgnWalletCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import * as React from "react";
import { useIONavigation } from "../../../../navigation/params/AppParamsList";
import { useIOSelector } from "../../../../store/hooks";
import { profileSelector } from "../../../../store/reducers/profile";
import { withWalletCardBaseComponent } from "../../../newWallet/components/WalletCardBaseComponent";
import { WalletCardPressableBase } from "../../../newWallet/components/WalletCardPressableBase";
import { withWalletCardBaseComponent } from "../../../wallet/components/WalletCardBaseComponent";
import { WalletCardPressableBase } from "../../../wallet/components/WalletCardPressableBase";
import CGN_ROUTES from "../navigation/routes";
import { CgnCard, CgnCardProps } from "./CgnCard";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { StatusEnum } from "../../../../../../../definitions/cgn/CardActivated";
import { SagaCallReturnType } from "../../../../../../types/utils";
import { getNetworkError } from "../../../../../../utils/errors";
import { withRefreshApiCall } from "../../../../../fastLogin/saga/utils";
import { walletAddCards } from "../../../../../newWallet/store/actions/cards";
import { walletAddCards } from "../../../../../wallet/store/actions/cards";
import { BackendCGN } from "../../../api/backendCgn";
import { cgnDetails } from "../../../store/actions/details";

Expand Down
2 changes: 1 addition & 1 deletion ts/features/bonus/cgn/saga/networking/unsubscribe/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { readablePrivacyReport } from "../../../../../../utils/reporters"; // ha
import { BackendCGN } from "../../../api/backendCgn";
import { cgnUnsubscribe } from "../../../store/actions/unsubscribe";
import { withRefreshApiCall } from "../../../../../fastLogin/saga/utils";
import { walletRemoveCardsByType } from "../../../../../newWallet/store/actions/cards";
import { walletRemoveCardsByType } from "../../../../../wallet/store/actions/cards";

// handle the request for CGN unsubscription
export function* cgnUnsubscriptionHandler(
Expand Down
2 changes: 1 addition & 1 deletion ts/features/common/store/reducers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
NativeLoginState,
nativeLoginReducer
} from "../../../nativeLogin/store/reducers";
import walletReducer, { WalletState } from "../../../newWallet/store/reducers";
import walletReducer, { WalletState } from "../../../wallet/store/reducers";
import paymentsReducer, {
PaymentsState
} from "../../../payments/common/store/reducers";
Expand Down
4 changes: 2 additions & 2 deletions ts/features/design-system/core/DSWallet.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Banner, VSpacer, VStack } from "@pagopa/io-app-design-system";
import * as React from "react";
import { CredentialType } from "../../itwallet/common/utils/itwMocksUtils";
import { WalletCardsCategoryContainer } from "../../newWallet/components/WalletCardsCategoryContainer";
import { WalletCard, WalletCardCategory } from "../../newWallet/types";
import { WalletCardsCategoryContainer } from "../../wallet/components/WalletCardsCategoryContainer";
import { WalletCard, WalletCardCategory } from "../../wallet/types";
import { DesignSystemScreen } from "../components/DesignSystemScreen";
import { DesignSystemSection } from "../components/DesignSystemSection";

Expand Down
2 changes: 1 addition & 1 deletion ts/features/idpay/wallet/components/IdPayWalletCard.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { Pressable } from "react-native";
import { useIONavigation } from "../../../../navigation/params/AppParamsList";
import { withWalletCardBaseComponent } from "../../../newWallet/components/WalletCardBaseComponent";
import { withWalletCardBaseComponent } from "../../../wallet/components/WalletCardBaseComponent";
import { IDPayDetailsRoutes } from "../../details/navigation";
import { IdPayCard, IdPayCardProps } from "./IdPayCard";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { WalletDTO } from "../../../../../../definitions/idpay/WalletDTO";
import { withRefreshApiCall } from "../../../../fastLogin/saga/utils";
import { idPayWalletGet } from "../../store/actions";
import { handleGetIDPayWallet } from "../handleGetWallet";
import { walletAddCards } from "../../../../newWallet/store/actions/cards";
import { walletAddCards } from "../../../../wallet/store/actions/cards";

const mockedWallet: WalletDTO = { initiativeList: [] };

Expand Down
2 changes: 1 addition & 1 deletion ts/features/idpay/wallet/saga/handleGetWallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { readablePrivacyReport } from "../../../../utils/reporters";
import { withRefreshApiCall } from "../../../fastLogin/saga/utils";
import { IDPayClient } from "../../common/api/client";
import { idPayWalletGet } from "../store/actions";
import { walletAddCards } from "../../../newWallet/store/actions/cards";
import { walletAddCards } from "../../../wallet/store/actions/cards";

/**
* Handle the remote call to retrieve the IDPay wallet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { expectSaga } from "redux-saga-test-plan";
import { GlobalState } from "../../../../../store/reducers/types";
import { CredentialType } from "../../../common/utils/itwMocksUtils";
import { handleWalletCredentialsRehydration } from "../handleWalletCredentialsRehydration";
import { walletAddCards } from "../../../../newWallet/store/actions/cards";
import { walletAddCards } from "../../../../wallet/store/actions/cards";
import { StoredCredential } from "../../../common/utils/itwTypesUtils";
import { ItwLifecycleState } from "../../../lifecycle/store/reducers";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { deleteKey } from "@pagopa/io-react-native-crypto";
import { call, put } from "typed-redux-saga/macro";
import { walletRemoveCards } from "../../../newWallet/store/actions/cards";
import { walletRemoveCards } from "../../../wallet/store/actions/cards";
import { itwCredentialsRemove } from "../store/actions";

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { put } from "typed-redux-saga/macro";
import { walletAddCards } from "../../../newWallet/store/actions/cards";
import { walletAddCards } from "../../../wallet/store/actions/cards";
import { itwCredentialsStore } from "../store/actions";
import { getCredentialStatus } from "../../common/utils/itwCredentialStatusUtils";
import { CredentialType } from "../../common/utils/itwMocksUtils";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import * as A from "fp-ts/lib/Array";
import * as O from "fp-ts/lib/Option";
import { itwCredentialsSelector } from "../store/selectors";
import { StoredCredential } from "../../common/utils/itwTypesUtils";
import { WalletCard } from "../../../newWallet/types";
import { WalletCard } from "../../../wallet/types";
import { CredentialType } from "../../common/utils/itwMocksUtils";
import { walletAddCards } from "../../../newWallet/store/actions/cards";
import { walletAddCards } from "../../../wallet/store/actions/cards";
import { itwLifecycleIsValidSelector } from "../../lifecycle/store/selectors";
import { getCredentialStatus } from "../../common/utils/itwCredentialStatusUtils";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as RA from "fp-ts/lib/ReadonlyArray";
import { deleteKey } from "@pagopa/io-react-native-crypto";
import { itwCredentialsSelector } from "../../credentials/store/selectors";
import { itwLifecycleStoresReset } from "../store/actions";
import { walletRemoveCardsByType } from "../../../newWallet/store/actions/cards";
import { walletRemoveCardsByType } from "../../../wallet/store/actions/cards";
import { isIos } from "../../../../utils/platform";
import { StoredCredential } from "../../common/utils/itwTypesUtils";
import { itwIntegrityKeyTagSelector } from "../../issuance/store/selectors";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { withWalletCardBaseComponent } from "../../../newWallet/components/WalletCardBaseComponent";
import { withWalletCardBaseComponent } from "../../../wallet/components/WalletCardBaseComponent";
import { ItwCredentialCard } from "../../common/components/ItwCredentialCard";
import { WalletCardPressableBase } from "../../../newWallet/components/WalletCardPressableBase";
import { WalletCardPressableBase } from "../../../wallet/components/WalletCardPressableBase";
import { useIONavigation } from "../../../../navigation/params/AppParamsList";
import { ITW_ROUTES } from "../../navigation/routes";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { StyleSheet, View } from "react-native";
import Placeholder from "rn-placeholder";
import { LogoPaymentWithFallback } from "../../../../components/ui/utils/components/LogoPaymentWithFallback";
import { WithTestID } from "../../../../types/WithTestID";
import { WalletCardPressableBase } from "../../../newWallet/components/WalletCardPressableBase";
import { WalletCardPressableBase } from "../../../wallet/components/WalletCardPressableBase";
import { PaymentCardProps } from "./PaymentCard";

export type PaymentCardSmallProps = WithTestID<
Expand Down
2 changes: 1 addition & 1 deletion ts/features/payments/common/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { PaymentCardProps } from "../components/PaymentCard";
import { UIWalletInfoDetails } from "../types/UIWalletInfoDetails";
import { NoticeListItem } from "../../../../../definitions/pagopa/biz-events/NoticeListItem";
import { findFirstCaseInsensitive } from "../../../../utils/object";
import { WalletCard } from "../../../newWallet/types";
import { WalletCard } from "../../../wallet/types";
import { contentRepoUrl } from "../../../../config";
import { LevelEnum } from "../../../../../definitions/content/SectionStatus";
import { AlertVariant, ListItemTransactionStatus } from "./types";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
import { readablePrivacyReport } from "../../../../utils/reporters";
import { getGenericError, getNetworkError } from "../../../../utils/errors";
import { WalletClient } from "../../common/api/client";
import { walletRemoveCards } from "../../../newWallet/store/actions/cards";
import { walletRemoveCards } from "../../../wallet/store/actions/cards";
import { mapWalletIdToCardKey } from "../../common/utils";
import { withPaymentsSessionToken } from "../../common/utils/withPaymentsSessionToken";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { paymentsGetMethodDetailsAction } from "../store/actions";
import { readablePrivacyReport } from "../../../../utils/reporters";
import { getGenericError, getNetworkError } from "../../../../utils/errors";
import { WalletClient } from "../../common/api/client";
import { walletAddCards } from "../../../newWallet/store/actions/cards";
import { walletAddCards } from "../../../wallet/store/actions/cards";
import { mapWalletsToCards } from "../../common/utils";
import { withPaymentsSessionToken } from "../../common/utils/withPaymentsSessionToken";

Expand Down
4 changes: 2 additions & 2 deletions ts/features/payments/wallet/components/PaymentWalletCard.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from "react";
import { useIONavigation } from "../../../../navigation/params/AppParamsList";
import { withWalletCardBaseComponent } from "../../../newWallet/components/WalletCardBaseComponent";
import { withWalletCardBaseComponent } from "../../../wallet/components/WalletCardBaseComponent";
import {
PaymentCard,
PaymentCardProps
} from "../../common/components/PaymentCard";
import { WalletCardPressableBase } from "../../../newWallet/components/WalletCardPressableBase";
import { WalletCardPressableBase } from "../../../wallet/components/WalletCardPressableBase";
import { PaymentsMethodDetailsRoutes } from "../../details/navigation/routes";

export type PaymentWalletCardProps = PaymentCardProps & {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { WalletStatusEnum } from "../../../../../../definitions/pagopa/walletv3/
import { Wallets } from "../../../../../../definitions/pagopa/walletv3/Wallets";
import { getPaymentsWalletUserMethods } from "../../store/actions";
import { handleGetPaymentsWalletUserMethods } from "../handleGetPaymentsWalletUserMethods";
import { WalletCard } from "../../../../newWallet/types";
import { walletAddCards } from "../../../../newWallet/store/actions/cards";
import { WalletCard } from "../../../../wallet/types";
import { walletAddCards } from "../../../../wallet/store/actions/cards";
import { getGenericError } from "../../../../../utils/errors";
import { readablePrivacyReport } from "../../../../../utils/reporters";
import { getDateFromExpiryDate } from "../../../../../utils/dates";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { put } from "typed-redux-saga/macro";
import { ActionType } from "typesafe-actions";
import { getGenericError, getNetworkError } from "../../../../utils/errors";
import { readablePrivacyReport } from "../../../../utils/reporters";
import { walletAddCards } from "../../../newWallet/store/actions/cards";
import { walletAddCards } from "../../../wallet/store/actions/cards";
import { WalletClient } from "../../common/api/client";
import { mapWalletsToCards } from "../../common/utils";
import { getPaymentsWalletUserMethods } from "../store/actions";
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions ts/mixpanelConfig/mixpanelPropertyUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { fastLoginOptInSelector } from "../features/fastLogin/store/selectors";
import {
selectBonusCards,
selectWalletCgnCard
} from "../features/newWallet/store/selectors";
import { WalletCardBonus } from "../features/newWallet/types";
} from "../features/wallet/store/selectors";
import { WalletCardBonus } from "../features/wallet/types";
import { paymentsWalletUserMethodsSelector } from "../features/payments/wallet/store/selectors";
import {
NotificationPreferenceConfiguration,
Expand Down
4 changes: 2 additions & 2 deletions ts/navigation/TabNavigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { makeFontStyleObject } from "../components/core/fonts";
import { TabIconComponent } from "../components/ui/TabIconComponent";
import { MESSAGES_ROUTES } from "../features/messages/navigation/routes";
import { MessagesHomeScreen } from "../features/messages/screens/MessagesHomeScreen";
import { WalletHomeScreen as NewWalletHomeScreen } from "../features/newWallet/screens/WalletHomeScreen";
import { WalletHomeScreen } from "../features/wallet/screens/WalletHomeScreen";
import { PaymentsHomeScreen } from "../features/payments/home/screens/PaymentsHomeScreen";
import { SERVICES_ROUTES } from "../features/services/common/navigation/routes";
import { ServicesHomeScreen } from "../features/services/home/screens/ServicesHomeScreen";
Expand Down Expand Up @@ -91,7 +91,7 @@ export const MainTabNavigator = () => {
/>
<Tab.Screen
name={ROUTES.WALLET_HOME}
component={NewWalletHomeScreen}
component={WalletHomeScreen}
options={{
title: I18n.t("global.navigator.wallet"),
tabBarIcon: ({ color, focused }) => (
Expand Down
2 changes: 1 addition & 1 deletion ts/navigation/params/MainTabParamsList.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import ROUTES from "../routes";
import { MESSAGES_ROUTES } from "../../features/messages/navigation/routes";
import { SERVICES_ROUTES } from "../../features/services/common/navigation/routes";
import { WalletHomeNavigationParams } from "../../features/newWallet/screens/WalletHomeScreen";
import { WalletHomeNavigationParams } from "../../features/wallet/screens/WalletHomeScreen";

export type MainTabParamsList = {
[MESSAGES_ROUTES.MESSAGES_HOME]: undefined;
Expand Down
4 changes: 2 additions & 2 deletions ts/sagas/startup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ import { watchFimsSaga } from "../features/fims/common/saga";
import { deletePin, getPin } from "../utils/keychain";
import { watchEmailValidationSaga } from "../store/sagas/emailValidationPollingSaga";
import { handleIsKeyStrongboxBacked } from "../features/lollipop/utils/crypto";
import { watchWalletSaga as watchNewWalletSaga } from "../features/newWallet/saga";
import { watchWalletSaga } from "../features/wallet/saga";
import { watchServicesSaga } from "../features/services/common/saga";
import { watchItwSaga } from "../features/itwallet/common/saga";
import { watchTrialSystemSaga } from "../features/trialSystem/store/sagas/watchTrialSystemSaga";
Expand Down Expand Up @@ -561,7 +561,7 @@ export function* initializeApplicationSaga(
//

// Start wathing new wallet sagas
yield* fork(watchNewWalletSaga);
yield* fork(watchWalletSaga);

// Here we can be sure that the session information is loaded and valid
const bpdToken = maybeSessionInformation.value.bpdToken as string;
Expand Down
4 changes: 2 additions & 2 deletions ts/store/actions/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { FciActions } from "../../features/fci/store/actions";
import { IdPayActions } from "../../features/idpay/common/store/actions";
import { LollipopActions } from "../../features/lollipop/store/actions/lollipop";
import { MessagesActions } from "../../features/messages/store/actions";
import { WalletActions as NewWalletActions } from "../../features/newWallet/store/actions";
import { WalletActions } from "../../features/wallet/store/actions";
import { PaymentsActions as PaymentsFeatureActions } from "../../features/payments/common/store/actions";
import { PnActions } from "../../features/pn/store/actions";
import { ServicesActions } from "../../features/services/common/store/actions";
Expand Down Expand Up @@ -97,7 +97,7 @@ export type Action =
| FastLoginActions
| WhatsNewActions
| PaymentsFeatureActions
| NewWalletActions
| WalletActions
| CieLoginConfigActions
| FimsActions
| ItwActions
Expand Down

0 comments on commit 25bb1c1

Please sign in to comment.