Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into SIW-1972-remote-pre…
Browse files Browse the repository at this point in the history
…sentation-same-device
  • Loading branch information
RiccardoMolinari95 committed Feb 13, 2025
2 parents f2a0a91 + df85e81 commit 4ff90e5
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 17 deletions.
4 changes: 2 additions & 2 deletions ts/components/screens/OperationResultScreenContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ type OperationResultScreenContentProps = WithTestID<{
subtitleProps?: Pick<BodyProps, "textBreakStrategy" | "lineBreakStrategyIOS">;
action?: Pick<
ButtonSolidProps,
"label" | "accessibilityLabel" | "onPress" | "testID"
"label" | "accessibilityLabel" | "onPress" | "testID" | "icon"
>;
secondaryAction?: Pick<
ButtonLinkProps,
"label" | "accessibilityLabel" | "onPress" | "testID"
"label" | "accessibilityLabel" | "onPress" | "testID" | "icon"
>;
isHeaderVisible?: boolean;
}>;
Expand Down
8 changes: 3 additions & 5 deletions ts/features/barcode/screens/BarcodeScanScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ import {
IOStackNavigationProp
} from "../../../navigation/params/AppParamsList";
import { useIOSelector } from "../../../store/hooks";
import {
barcodesScannerConfigSelector,
isIdPayEnabledSelector
} from "../../../store/reducers/backendStatus/remoteConfig";
import { barcodesScannerConfigSelector } from "../../../store/reducers/backendStatus/remoteConfig";
import { emptyContextualHelp } from "../../../utils/emptyContextualHelp";
import { useIOBottomSheetAutoresizableModal } from "../../../utils/hooks/bottomSheet";
import { IdPayPaymentRoutes } from "../../idpay/payment/navigation/routes";
Expand All @@ -45,11 +42,12 @@ import { useHardwareBackButton } from "../../../hooks/useHardwareBackButton";
import { usePagoPaPayment } from "../../payments/checkout/hooks/usePagoPaPayment";
import { FCI_ROUTES } from "../../fci/navigation/routes";
import { paymentAnalyticsDataSelector } from "../../payments/history/store/selectors";
import { isIdPayLocallyEnabledSelector } from "../../../store/reducers/persistedPreferences.ts";

const BarcodeScanScreen = () => {
const navigation = useNavigation<IOStackNavigationProp<AppParamsList>>();
const openDeepLink = useOpenDeepLink();
const isIdPayEnabled = useIOSelector(isIdPayEnabledSelector);
const isIdPayEnabled = useIOSelector(isIdPayLocallyEnabledSelector);
const paymentAnalyticsData = useIOSelector(paymentAnalyticsDataSelector);

const { startPaymentFlowWithRptId } = usePagoPaPayment();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ const WalletPaymentFailureDetail = ({ failure }: Props) => {
accessibilityLabel: I18n.t(
"wallet.payment.failure.PAYMENT_CANCELED.action"
),
icon: "categLearning",
onPress: handleDiscoverMore
};

Expand Down
6 changes: 3 additions & 3 deletions ts/screens/profile/DeveloperModeSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import {
} from "../../store/reducers/authentication";
import { isDebugModeEnabledSelector } from "../../store/reducers/debug";
import {
isIdPayTestEnabledSelector,
isIdPayLocallyEnabledSelector,
isIOMarkdownEnabledLocallySelector,
isPagoPATestEnabledSelector,
isPnTestEnabledSelector
Expand Down Expand Up @@ -349,7 +349,7 @@ const DesignSystemSection = () => {

const PlaygroundsSection = () => {
const navigation = useIONavigation();
const isIdPayTestEnabled = useIOSelector(isIdPayTestEnabledSelector);
const isIdPayTestEnabled = useIOSelector(isIdPayLocallyEnabledSelector);

const playgroundsNavListItems: ReadonlyArray<PlaygroundsNavListItem> = [
{
Expand Down Expand Up @@ -453,7 +453,7 @@ const DeveloperTestEnvironmentSection = ({
const dispatch = useIODispatch();
const isPagoPATestEnabled = useIOSelector(isPagoPATestEnabledSelector);
const isPnTestEnabled = useIOSelector(isPnTestEnabledSelector);
const isIdPayTestEnabled = useIOSelector(isIdPayTestEnabledSelector);
const isIdPayTestEnabled = useIOSelector(isIdPayLocallyEnabledSelector);

const onPagoPAEnvironmentToggle = (enabled: boolean) => {
if (enabled) {
Expand Down
8 changes: 5 additions & 3 deletions ts/screens/profile/SecurityScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ import ROUTES from "../../navigation/routes";
import { identificationRequest } from "../../store/actions/identification";
import { preferenceFingerprintIsEnabledSaveSuccess } from "../../store/actions/persistedPreferences";
import { useIODispatch, useIOSelector } from "../../store/hooks";
import { isIdPayEnabledSelector } from "../../store/reducers/backendStatus/remoteConfig";
import { isFingerprintEnabledSelector } from "../../store/reducers/persistedPreferences";
import {
isFingerprintEnabledSelector,
isIdPayLocallyEnabledSelector
} from "../../store/reducers/persistedPreferences";
import { getFlowType } from "../../utils/analytics";
import {
biometricAuthenticationRequest,
Expand Down Expand Up @@ -51,7 +53,7 @@ const SecurityScreen = (): ReactElement => {
const dispatch = useIODispatch();
const isFingerprintEnabled = useIOSelector(isFingerprintEnabledSelector);
const isIdPayCodeOnboarded = useIOSelector(isIdPayCodeOnboardedSelector);
const isIdPayEnabled = useIOSelector(isIdPayEnabledSelector);
const isIdPayEnabled = useIOSelector(isIdPayLocallyEnabledSelector);
const isFimsHistoryEnabled = useIOSelector(fimsIsHistoryEnabledSelector);
const navigation = useIONavigation();
const [isBiometricDataAvailable, setIsBiometricDataAvailable] =
Expand Down
4 changes: 2 additions & 2 deletions ts/store/reducers/backendStatus/remoteConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { getAppVersion, isVersionSupported } from "../../../utils/appVersion";
import { backendStatusLoadSuccess } from "../../actions/backendStatus";
import { Action } from "../../actions/types";
import { isPropertyWithMinAppVersionEnabled } from "../featureFlagWithMinAppVersionStatus";
import { isIdPayTestEnabledSelector } from "../persistedPreferences";
import { isIdPayLocallyEnabledSelector } from "../persistedPreferences";
import { GlobalState } from "../types";

export type RemoteConfigState = O.Option<BackendStatus["config"]>;
Expand Down Expand Up @@ -279,7 +279,7 @@ export const isFciEnabledSelector = createSelector(

export const isIdPayEnabledSelector = createSelector(
remoteConfigSelector,
isIdPayTestEnabledSelector,
isIdPayLocallyEnabledSelector,
(remoteConfig, isIdPayTestEnabled): boolean =>
isIdPayTestEnabled ||
pipe(
Expand Down
4 changes: 2 additions & 2 deletions ts/store/reducers/persistedPreferences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ export const isMixpanelEnabled = (state: GlobalState): boolean | null =>
export const isPnTestEnabledSelector = (state: GlobalState) =>
state.persistedPreferences.isPnTestEnabled;

export const isIdPayTestEnabledSelector = (state: GlobalState) =>
!!state.persistedPreferences?.isIdPayTestEnabled;
export const isIdPayLocallyEnabledSelector = (state: GlobalState) =>
state.persistedPreferences?.isIdPayTestEnabled;

// 'isDesignSystemEnabled' has been introduced without a migration
// (PR https://github.com/pagopa/io-app/pull/4427) so there are cases
Expand Down

0 comments on commit 4ff90e5

Please sign in to comment.