Skip to content

Commit

Permalink
chore(Bonus Pagamenti Digitali): [#176844720] Remove cobadge feature …
Browse files Browse the repository at this point in the history
…flag (#2802)

* [#176844720] remove cobadge feature flag

* [#176844720] remove cobadge ff

* [#176844720] fix typescript
  • Loading branch information
fabriziofff authored Feb 10, 2021
1 parent aa362a6 commit 0fe3307
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 23 deletions.
1 change: 0 additions & 1 deletion .env.local
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,3 @@ BPD_API_SIT='https://bpd-dev.azure-api.net'
BPD_API_UAT='https://test.cstar.pagopa.it'
# CGN configuration
CGN_ENABLED=NO
COBADGE_ENABLED=NO
1 change: 0 additions & 1 deletion .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,3 @@ BPD_API_SIT='https://bpd-dev.azure-api.net'
BPD_API_UAT='https://test.cstar.pagopa.it'
# CGN configuration
CGN_ENABLED=NO
COBADGE_ENABLED=NO
2 changes: 0 additions & 2 deletions ts/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ export const isPlaygroundsEnabled: boolean =
// CGN Feature Flag
export const cgnEnabled: boolean = Config.CGN_ENABLED === "YES";

export const cobadgeEnabled: boolean = Config.COBADGE_ENABLED === "YES";

// version of ToS
export const tosVersion: NonNegativeNumber = 2.1 as NonNegativeNumber;

Expand Down
17 changes: 6 additions & 11 deletions ts/features/wallet/bancomat/screen/BancomatDetailScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,29 +1,26 @@
import { none } from "fp-ts/lib/Option";
import { Button, View } from "native-base";
import * as React from "react";
import { StyleSheet } from "react-native";
import { NavigationActions, NavigationInjectedProps } from "react-navigation";
import { connect } from "react-redux";
import { Dispatch } from "redux";
import pagoBancomatImage from "../../../../../img/wallet/cards-icons/pagobancomat.png";
import { Label } from "../../../../components/core/typography/Label";
import { IOColors } from "../../../../components/core/variables/IOColors";
import { IOStyles } from "../../../../components/core/variables/IOStyles";
import ItemSeparatorComponent from "../../../../components/ItemSeparatorComponent";
import DarkLayout from "../../../../components/screens/DarkLayout";
import { cobadgeEnabled } from "../../../../config";
import I18n from "../../../../i18n";
import { mixpanelTrack } from "../../../../mixpanel";
import { navigateToWalletAddPaymentMethod } from "../../../../store/actions/navigation";
import { deleteWalletRequest } from "../../../../store/actions/wallet/wallets";
import { GlobalState } from "../../../../store/reducers/types";
import { BancomatPaymentMethod } from "../../../../types/pagopa";
import { emptyContextualHelp } from "../../../../utils/emptyContextualHelp";
import { showToast } from "../../../../utils/showToast";
import PaymentMethodCapabilities from "../../component/PaymentMethodCapabilities";
import { useRemovePaymentMethodBottomSheet } from "../../component/RemovePaymentMethod";
import { navigateToOnboardingCoBadgeChooseTypeStartScreen } from "../../onboarding/cobadge/navigation/action";
import BancomatCard from "../component/bancomatCard/BancomatCard";
import pagoBancomatImage from "../../../../../img/wallet/cards-icons/pagobancomat.png";
import { emptyContextualHelp } from "../../../../utils/emptyContextualHelp";
import BancomatInformation from "./BancomatInformation";

type NavigationParams = Readonly<{
Expand Down Expand Up @@ -138,12 +135,10 @@ const mapDispatchToProps = (dispatch: Dispatch) => ({
),
addCoBadge: (abi: string) =>
dispatch(
cobadgeEnabled
? navigateToOnboardingCoBadgeChooseTypeStartScreen({
abi,
legacyAddCreditCardBack: 1
})
: navigateToWalletAddPaymentMethod({ inPayment: none })
navigateToOnboardingCoBadgeChooseTypeStartScreen({
abi,
legacyAddCreditCardBack: 1
})
)
});

Expand Down
9 changes: 1 addition & 8 deletions ts/features/wallet/component/NewMethodAddedNotifier.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { none } from "fp-ts/lib/Option";
import { useState } from "react";
import { connect } from "react-redux";
import { Dispatch } from "redux";
import { cobadgeEnabled } from "../../../config";
import { navigateToWalletAddPaymentMethod } from "../../../store/actions/navigation";
import { GlobalState } from "../../../store/reducers/types";
import { useActionOnFocus } from "../../../utils/hooks/useOnFocus";
import bancomatInformationBottomSheet from "../bancomat/utils/bancomatInformationBottomSheet";
Expand Down Expand Up @@ -45,11 +42,7 @@ const NewPaymentMethodAddedNotifier = (props: Props) => {

const mapDispatchToProps = (dispatch: Dispatch) => ({
startCoBadgeOnboarding: () =>
dispatch(
cobadgeEnabled
? navigateToOnboardingCoBadgeChooseTypeStartScreen({})
: navigateToWalletAddPaymentMethod({ inPayment: none })
)
dispatch(navigateToOnboardingCoBadgeChooseTypeStartScreen({}))
});

const mapStateToProps = (state: GlobalState) => ({
Expand Down

0 comments on commit 0fe3307

Please sign in to comment.