Skip to content

Commit

Permalink
Merge branch 'master' into IOAPPX-405-remove-react-import-
Browse files Browse the repository at this point in the history
  • Loading branch information
LeleDallas committed Jan 16, 2025
2 parents 3fb5788 + c3b2f95 commit 1e39bca
Show file tree
Hide file tree
Showing 29 changed files with 300 additions and 175 deletions.
10 changes: 1 addition & 9 deletions .env.local
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ TOT_MESSAGE_FETCH_WORKERS=5
SHUFFLE_PINPAD_ON_PAYMENT=NO
# Repository of app content
CONTENT_REPO_URL='http://127.0.0.1:3000/static_contents'
# Privacy url to load in TOS Screen
PRIVACY_URL='https://io.italia.it/app-content/tos_privacy.html'
# Privacy url for Zendesk usage
ZENDESK_PRIVACY_URL='https://www.pagopa.it/it/privacy-policy-assistenza/'
# Mixpanel
Expand Down Expand Up @@ -60,10 +58,6 @@ IDPAY_ENABLED=YES
IDPAY_API_BASEURL='http://127.0.0.1:3000'
# IDPay test/env RESTful API
IDPAY_API_UAT_BASEURL='https://api-io.uat.cstar.pagopa.it'
# Unsupported device more information url
UNSUPPORTED_DEVICE_MORE_INFO_URL='https://io.italia.it/app-content/unsupported_device.html'
# Unsupported device learn more url
UNSUPPORTED_DEVICE_LEARN_MORE_URL='https://io.italia.it/faq/#n1_15'
# Cie/Spid more information url
CIE_SPID_INFORMATION_URL='https://identitadigitale.gov.it'
# Pin/Puk help url
Expand Down Expand Up @@ -95,6 +89,4 @@ ITW_ISSUANCE_REDIRECT_URI="https://wallet.io.pagopa.it/index.html"
# Bypass the check that enforces the identity of the issued eID is the same as the authenticated user
ITW_BYPASS_IDENTITY_MATCH=YES
# Use the test environment for the IDP hint for both CIE and SPID
ITW_IDP_HINT_TEST=YES
# IPZS Privacy Policy URL
ITW_IPZS_PRIVACY_URL='https://io.italia.it/informativa-ipzs'
ITW_IDP_HINT_TEST=YES
10 changes: 1 addition & 9 deletions .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ TOT_MESSAGE_FETCH_WORKERS=5
SHUFFLE_PINPAD_ON_PAYMENT=NO
# Repository of app content
CONTENT_REPO_URL='https://assets.cdn.io.pagopa.it'
# Privacy url to load in TOS Screen
PRIVACY_URL='https://io.italia.it/app-content/tos_privacy.html'
# Privacy url for Zendesk usage
ZENDESK_PRIVACY_URL='https://www.pagopa.it/it/privacy-policy-assistenza/'
# Mixpanel
Expand Down Expand Up @@ -60,10 +58,6 @@ IDPAY_ENABLED=YES
IDPAY_API_BASEURL='https://api-io.cstar.pagopa.it'
# IDPay test/env RESTful API
IDPAY_API_UAT_BASEURL='https://api-io.uat.cstar.pagopa.it'
# Unsupported device more information url
UNSUPPORTED_DEVICE_MORE_INFO_URL='https://io.italia.it/app-content/unsupported_device.html'
# Unsupported device learn more url
UNSUPPORTED_DEVICE_LEARN_MORE_URL='https://io.italia.it/faq/#n1_15'
# Cie/Spid more information url
CIE_SPID_INFORMATION_URL='https://identitadigitale.gov.it'
# Pin/Puk help url
Expand Down Expand Up @@ -95,6 +89,4 @@ ITW_ISSUANCE_REDIRECT_URI="https://wallet.io.pagopa.it/index.html"
# Bypass the check that enforces the identity of the issued eID is the same as the authenticated user
ITW_BYPASS_IDENTITY_MATCH=NO
# Use the test environment for the IDP hint for both CIE and SPID
ITW_IDP_HINT_TEST=NO
# IPZS Privacy Policy URL
ITW_IPZS_PRIVACY_URL='https://io.italia.it/informativa-ipzs'
ITW_IDP_HINT_TEST=NO
8 changes: 0 additions & 8 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,6 @@ module.exports = {
message:
'Importing { pot } from "@pagopa/ts-commons" is not allowed. Use \'import * as pot from "@pagopa/ts-commons/lib/pot"\' instead.'
}
],
patterns: [
{
group: ["**/config"],
importNames: ["privacyUrl"],
message:
'Importing "privacyUrl" from "config.ts" module is restricted. Please use "tosConfigSelector" to obtain it instead.'
}
]
}
]
Expand Down
1 change: 0 additions & 1 deletion locales/de/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ global:
open:
label: "Kontextbezogene Hilfe"
hint: "Greif auf Informationen über den Inhalt des aktuellen Bildschirms zu"
ioWebSite: "https://io.italia.it"
symbols:
question: "?"
asterisk: "*"
Expand Down
1 change: 0 additions & 1 deletion locales/en/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ global:
open:
label: Contextual Help
hint: Access information about the contents of the current screen
ioWebSite: https://io.italia.it
symbols:
question: "?"
asterisk: "*"
Expand Down
1 change: 0 additions & 1 deletion locales/it/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ global:
open:
label: Aiuto contestuale
hint: Accedi alle informazioni sul contenuto della schermata corrente
ioWebSite: https://io.italia.it
symbols:
question: "?"
asterisk: "*"
Expand Down
3 changes: 2 additions & 1 deletion scripts/generate-api-models.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash

IO_BACKEND_VERSION=v16.4.0-RELEASE
IO_SERVICES_METADATA_VERSION=1.0.54
# need to change after merge on io-services-metadata
IO_SERVICES_METADATA_VERSION=1.0.55

declare -a apis=(
# Backend APIs
Expand Down
23 changes: 0 additions & 23 deletions ts/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,30 +150,12 @@ export const totMessageFetchWorkers = pipe(
export const shufflePinPadOnPayment =
Config.SHUFFLE_PINPAD_ON_PAYMENT === "YES";

export const privacyUrl: string = pipe(
Config.PRIVACY_URL,
t.string.decode,
E.getOrElse(() => "https://io.italia.it/app-content/tos_privacy.html")
);

export const zendeskPrivacyUrl: string = pipe(
Config.ZENDESK_PRIVACY_URL,
t.string.decode,
E.getOrElse(() => "https://www.pagopa.it/it/privacy-policy-assistenza/")
);

export const unsupportedDeviceMoreInfoUrl: string = pipe(
Config.UNSUPPORTED_DEVICE_MORE_INFO_URL,
NonEmptyString.decode,
E.getOrElse(() => "https://io.italia.it/app-content/unsupported_device.html")
);

export const unsupportedDeviceLearnMoreUrl: string = pipe(
Config.UNSUPPORTED_DEVICE_LEARN_MORE_URL,
NonEmptyString.decode,
E.getOrElse(() => "https://io.italia.it/faq/#n1_15")
);

export const cieSpidMoreInfoUrl: string = pipe(
Config.CIE_SPID_INFORMATION_URL,
NonEmptyString.decode,
Expand Down Expand Up @@ -247,8 +229,3 @@ export const itwEaaVerifierBaseUrl = Config.ITW_EAA_VERIFIER_BASE_URL;
export const itwBypassIdentityMatch =
Config.ITW_BYPASS_IDENTITY_MATCH === "YES";
export const itwIdpHintTest = Config.ITW_IDP_HINT_TEST === "YES";
export const itwIpzsPrivacyUrl: string = pipe(
Config.ITW_IPZS_PRIVACY_URL,
t.string.decode,
E.getOrElse(() => "https://io.italia.it/informativa-ipzs")
);
56 changes: 0 additions & 56 deletions ts/features/bonus/cgn/__mock__/availableMerchantDetail.ts

This file was deleted.

8 changes: 5 additions & 3 deletions ts/features/fastLogin/components/SecuritySuggestions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ import { View } from "react-native";
import I18n from "../../../i18n";
import { openWebUrl } from "../../../utils/url";
import { useOnFirstRender } from "../../../utils/hooks/useOnFirstRender";
import { useIODispatch } from "../../../store/hooks";
import { useIODispatch, useIOSelector } from "../../../store/hooks";
import { setSecurityAdviceAcknowledged } from "../store/actions/securityAdviceActions";
import { trackWhatsNewScreen } from "../../whatsnew/analytics";
import { absolutePortalLinksSelector } from "../../../store/reducers/backendStatus/remoteConfig";

const SecuritySuggestions = () => {
const dispatch = useIODispatch();
const absolutePortalLinks = useIOSelector(absolutePortalLinksSelector);

useOnFirstRender(() => {
dispatch(setSecurityAdviceAcknowledged(true));
Expand All @@ -29,7 +31,7 @@ const SecuritySuggestions = () => {
label: I18n.t(
"authentication.security_suggestions.navigate_to_the_site"
),
onPress: () => openWebUrl("https://ioapp.it/")
onPress: () => openWebUrl(absolutePortalLinks.io_web)
}}
/>
<VSpacer size={24} />
Expand All @@ -40,7 +42,7 @@ const SecuritySuggestions = () => {
label: I18n.t(
"authentication.security_suggestions.navigate_to_the_site"
),
onPress: () => openWebUrl("https://ioapp.it/")
onPress: () => openWebUrl(absolutePortalLinks.io_web)
}}
/>
<VSpacer size={24} />
Expand Down
11 changes: 8 additions & 3 deletions ts/features/itwallet/common/components/ItwIssuanceMetadata.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ import {
trackWalletCredentialShowAuthSource,
trackWalletCredentialShowIssuer
} from "../../analytics";
import { itwIpzsPrivacyUrl } from "../../../../config";
import { ITW_IPZS_PRIVACY_URL_BODY } from "../../../../urls";
import { useIOSelector } from "../../../../store/hooks";
import { generateDynamicUrlSelector } from "../../../../store/reducers/backendStatus/remoteConfig";

type ItwIssuanceMetadataProps = {
credential: StoredCredential;
Expand Down Expand Up @@ -98,6 +100,9 @@ export const ItwIssuanceMetadata = ({
const releaserName =
credential.issuerConf.federation_entity.organization_name;
const authSource = getAuthSource(credential);
const privacyUrl = useIOSelector(state =>
generateDynamicUrlSelector(state, "io_showcase", ITW_IPZS_PRIVACY_URL_BODY)
);

const releaserNameBottomSheet: ItwMetadataIssuanceListItemProps["bottomSheet"] =
useMemo(
Expand All @@ -108,15 +113,15 @@ export const ItwIssuanceMetadata = ({
contentBody: I18n.t(
"features.itWallet.issuance.credentialPreview.bottomSheet.about.subtitle",
{
privacyUrl: itwIpzsPrivacyUrl
privacyUrl
}
),
onPress: () =>
trackWalletCredentialShowIssuer(
CREDENTIALS_MAP[credential.credentialType]
)
}),
[credential.credentialType]
[credential.credentialType, privacyUrl]
);

const authSourceBottomSheet: ItwMetadataIssuanceListItemProps["bottomSheet"] =
Expand Down
10 changes: 7 additions & 3 deletions ts/features/itwallet/discovery/screens/ItwIpzsPrivacyScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@ import LoadingSpinnerOverlay from "../../../../components/LoadingSpinnerOverlay"
import ItwPrivacyWebViewComponent from "../components/ItwPrivacyWebViewComponent";
import { ItwEidIssuanceMachineContext } from "../../machine/provider";
import { trackOpenItwTosAccepted } from "../../analytics";
import { itwIpzsPrivacyUrl } from "../../../../config";
import ItwMarkdown from "../../common/components/ItwMarkdown";
import { ITW_IPZS_PRIVACY_URL_BODY } from "../../../../urls";
import { generateDynamicUrlSelector } from "../../../../store/reducers/backendStatus/remoteConfig";
import { useIOSelector } from "../../../../store/hooks";

const ItwIpzsPrivacyScreen = () => {
const [isLoading, setIsLoading] = useState(true);
const machineRef = ItwEidIssuanceMachineContext.useActorRef();

const privacyUrl = useIOSelector(state =>
generateDynamicUrlSelector(state, "io_showcase", ITW_IPZS_PRIVACY_URL_BODY)
);
const handleContinuePress = () => {
trackOpenItwTosAccepted();
machineRef.send({ type: "accept-ipzs-privacy" });
Expand Down Expand Up @@ -50,7 +54,7 @@ const ItwIpzsPrivacyScreen = () => {
</ContentWrapper>
<ItwPrivacyWebViewComponent
source={{
uri: itwIpzsPrivacyUrl
uri: privacyUrl
}}
onAcceptTos={handleContinuePress}
onLoadEnd={onLoadEnd}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ import {
} from "../../analytics";
import LoadingScreenContent from "../../../../components/screens/LoadingScreenContent";
import { usePreventScreenCapture } from "../../../../utils/hooks/usePreventScreenCapture";
import { itwIpzsPrivacyUrl } from "../../../../config";
import { ITW_ROUTES } from "../../navigation/routes";
import { ITW_IPZS_PRIVACY_URL_BODY } from "../../../../urls";
import { generateDynamicUrlSelector } from "../../../../store/reducers/backendStatus/remoteConfig";

const ItwIssuanceCredentialTrustIssuerScreen = () => {
const eidOption = useIOSelector(itwCredentialsEidSelector);
Expand Down Expand Up @@ -103,6 +104,9 @@ type ContentViewProps = {
*/
const ContentView = ({ credentialType, eid }: ContentViewProps) => {
const route = useRoute();
const privacyUrl = useIOSelector(state =>
generateDynamicUrlSelector(state, "io_showcase", ITW_IPZS_PRIVACY_URL_BODY)
);

useFocusEffect(
useCallback(() => {
Expand Down Expand Up @@ -210,7 +214,7 @@ const ContentView = ({ credentialType, eid }: ContentViewProps) => {
onLinkOpen={trackOpenItwTos}
>
{I18n.t("features.itWallet.issuance.credentialAuth.tos", {
privacyUrl: itwIpzsPrivacyUrl
privacyUrl
})}
</ItwMarkdown>
</ContentWrapper>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ import { KoState, trackWalletCreationFailed } from "../../analytics";
import { openWebUrl } from "../../../../utils/url";
import { useEidEventsTracking } from "../hooks/useEidEventsTracking";
import { serializeFailureReason } from "../../common/utils/itwStoreUtils";

const FAQ_URL = "https://io.italia.it/documenti-su-io/faq/#n1_12";
import { useIOSelector } from "../../../../store/hooks";
import { generateDynamicUrlSelector } from "../../../../store/reducers/backendStatus/remoteConfig";
import { DOCUMENTS_ON_IO_FAQ_12_URL_BODY } from "../../../../urls";

export const ItwIssuanceEidFailureScreen = () => {
const failureOption =
Expand All @@ -46,6 +47,14 @@ const ContentView = ({ failure }: ContentViewProps) => {
ItwEidIssuanceMachineContext.useSelector(selectIdentification);
const toast = useIOToast();

const FAQ_URL = useIOSelector(state =>
generateDynamicUrlSelector(
state,
"io_showcase",
DOCUMENTS_ON_IO_FAQ_12_URL_BODY
)
);

useDebugInfo({
failure: serializeFailureReason(failure)
});
Expand Down
Loading

0 comments on commit 1e39bca

Please sign in to comment.