Skip to content

Commit

Permalink
chore: disable wallet activation
Browse files Browse the repository at this point in the history
  • Loading branch information
gispada committed Nov 26, 2024
1 parent 489cd4f commit 2468b86
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"io_session_manager_api": "https://raw.githubusercontent.com/pagopa/io-auth-n-identity-domain/[email protected]/apps/io-session-manager/api/internal.yaml",
"io_session_manager_public_api": "https://raw.githubusercontent.com/pagopa/io-auth-n-identity-domain/[email protected]/apps/io-session-manager/api/public.yaml",
"io_public_api": "https://raw.githubusercontent.com/pagopa/io-backend/v16.4.0-RELEASE/api_public.yaml",
"io_content_specs": "https://raw.githubusercontent.com/pagopa/io-services-metadata/1.0.46/definitions.yml",
"io_content_specs": "https://raw.githubusercontent.com/pagopa/io-services-metadata/1.0.48/definitions.yml",
"io_cgn_specs": "https://raw.githubusercontent.com/pagopa/io-backend/v16.4.0-RELEASE/api_cgn.yaml",
"io_cgn_merchants_specs": "https://raw.githubusercontent.com/pagopa/io-backend/v16.4.0-RELEASE/api_cgn_operator_search.yaml",
"api_fci": "https://raw.githubusercontent.com/pagopa/io-backend/v16.4.0-RELEASE/api_io_sign.yaml",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import {
trackOpenItwTos
} from "../../analytics";
import { itwPrivacyUrl, itwTosUrl } from "../../../../config";
import { useIOSelector } from "../../../../store/hooks";
import { isItwActivationDisabledSelector } from "../../../../store/reducers/backendStatus/remoteConfig";

/**
* This is the screen that shows the information about the discovery process
Expand All @@ -34,6 +36,7 @@ const ItwDiscoveryInfoScreen = () => {

const machineRef = ItwEidIssuanceMachineContext.useActorRef();
const isLoading = ItwEidIssuanceMachineContext.useSelector(selectIsLoading);
const itwActivationDisabled = useIOSelector(isItwActivationDisabledSelector);

const handleContinuePress = () => {
trackItWalletActivationStart();
Expand Down Expand Up @@ -79,6 +82,7 @@ const ItwDiscoveryInfoScreen = () => {
type: "SingleButton",
primary: {
loading: isLoading,
disabled: itwActivationDisabled,
label: I18n.t("global.buttons.continue"),
accessibilityLabel: I18n.t("global.buttons.continue"),
onPress: handleContinuePress
Expand Down
15 changes: 15 additions & 0 deletions ts/store/reducers/backendStatus/remoteConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -428,3 +428,18 @@ export const isItwFeedbackBannerEnabledSelector = createSelector(
O.getOrElse(() => false)
)
);

/**
* Return whether the Wallet activation is disabled.
* This is purely a "cosmetic" configuration to disable UI elements,
* it does not disable the entire IT Wallet feature.
*/
export const isItwActivationDisabledSelector = createSelector(
remoteConfigSelector,
remoteConfig =>
pipe(
remoteConfig,
O.chainNullableK(config => config.itw.wallet_activation_disabled),
O.getOrElse(() => false)
)
);

0 comments on commit 2468b86

Please sign in to comment.