From 7b1c965e0d4394262cdfa798db8e7898305628fc Mon Sep 17 00:00:00 2001 From: Federico Mastrini Date: Wed, 31 Jan 2024 15:51:21 +0100 Subject: [PATCH 1/3] chore: update lib --- package.json | 2 +- yarn.lock | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index ebda8693337..f3b07329a0e 100644 --- a/package.json +++ b/package.json @@ -117,7 +117,7 @@ "@pagopa/io-app-design-system": "1.20.1", "@pagopa/io-pagopa-commons": "^3.1.0", "@pagopa/io-react-native-crypto": "^0.2.1", - "@pagopa/io-react-native-login-utils": "^0.2.2", + "@pagopa/io-react-native-login-utils": "https://github.com/pagopa/io-react-native-login-utils.git#iowallet-test", "@pagopa/react-native-cie": "1.2.0", "@pagopa/ts-commons": "^10.15.0", "@react-native-async-storage/async-storage": "^1.17.10", diff --git a/yarn.lock b/yarn.lock index 3a737a2cc91..c67198656da 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3084,10 +3084,9 @@ resolved "https://registry.yarnpkg.com/@pagopa/io-react-native-crypto/-/io-react-native-crypto-0.2.1.tgz#3d62b0f0cf45b2a878e4ee0652239ea69089988e" integrity sha512-J+VP1kLXl1lQSJJYFMa+ljW9fWgMIYQskBJZFaVKPrtrZr8MJyrhNzlFUf2/EGwxm3kA+7o7budq6fPqdfVvvg== -"@pagopa/io-react-native-login-utils@^0.2.2": +"@pagopa/io-react-native-login-utils@https://github.com/pagopa/io-react-native-login-utils.git#iowallet-test": version "0.2.2" - resolved "https://registry.yarnpkg.com/@pagopa/io-react-native-login-utils/-/io-react-native-login-utils-0.2.2.tgz#9b37787f98d94fac645e70bda926638b14e59d0d" - integrity sha512-rOChvrMsJ5QvfLvcsttGP6M5LZkOWhOD2YVRL4+bMCVqNRMsSDmteBNoMWzWlRcXrKyd2ZORgDEa1zPmMRMhTw== + resolved "https://github.com/pagopa/io-react-native-login-utils.git#6836e4887e40d968ddb8486ff51df3ab6ae0b010" "@pagopa/openapi-codegen-ts@^12.2.1": version "12.2.1" From a7c7920b2be3bc99c80cd222b66ac4497a6ad236 Mon Sep 17 00:00:00 2001 From: Federico Mastrini Date: Wed, 31 Jan 2024 17:14:31 +0100 Subject: [PATCH 2/3] fix: types --- ts/screens/authentication/idpAuthSessionHandler.tsx | 4 ++-- ts/utils/analytics.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ts/screens/authentication/idpAuthSessionHandler.tsx b/ts/screens/authentication/idpAuthSessionHandler.tsx index 79e96ad346f..2c433712fb5 100644 --- a/ts/screens/authentication/idpAuthSessionHandler.tsx +++ b/ts/screens/authentication/idpAuthSessionHandler.tsx @@ -257,12 +257,12 @@ export const AuthSessionPage = () => { (error?: LoginUtilsError) => { void mixpanelTrack("SPID_ERROR", { idp, - description: error?.userInfo.Error, + description: error?.userInfo?.error, errorType: ErrorType.LOADING_ERROR }); const backPressed: LoginUtilsErrorType = "NativeAuthSessionClosed"; - if (error?.userInfo.Error === backPressed) { + if (error?.userInfo?.error === backPressed) { onBack(); return; } diff --git a/ts/utils/analytics.ts b/ts/utils/analytics.ts index 5b55f71390f..a3b2c6310e7 100644 --- a/ts/utils/analytics.ts +++ b/ts/utils/analytics.ts @@ -190,9 +190,9 @@ export function trackSpidLoginError( if (isLoginUtilsError(e)) { void mixpanelTrack(eventName, { idp: idpName, - code: e.userInfo.StatusCode, - description: e.userInfo.Error, - domain: e.userInfo.URL + code: e.userInfo?.statusCode, + description: e.userInfo?.error, + domain: e.userInfo?.url }); } else { const error = e as Error; From 4ccf6c2e8d52a8773e014664a44a14faec13fe1e Mon Sep 17 00:00:00 2001 From: Federico Mastrini Date: Fri, 9 Feb 2024 10:38:46 +0100 Subject: [PATCH 3/3] chore: aligned `yarn.lock` --- yarn.lock | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index f69eead1002..b3653ee4e59 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3310,9 +3310,10 @@ resolved "https://registry.yarnpkg.com/@pagopa/io-react-native-crypto/-/io-react-native-crypto-0.2.1.tgz#3d62b0f0cf45b2a878e4ee0652239ea69089988e" integrity sha512-J+VP1kLXl1lQSJJYFMa+ljW9fWgMIYQskBJZFaVKPrtrZr8MJyrhNzlFUf2/EGwxm3kA+7o7budq6fPqdfVvvg== -"@pagopa/io-react-native-login-utils@https://github.com/pagopa/io-react-native-login-utils.git#iowallet-test": - version "0.2.2" - resolved "https://github.com/pagopa/io-react-native-login-utils.git#6836e4887e40d968ddb8486ff51df3ab6ae0b010" +"@pagopa/io-react-native-login-utils@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@pagopa/io-react-native-login-utils/-/io-react-native-login-utils-1.0.0.tgz#26aa8fe2ae2c30f18d2714264524fd281f0f2b12" + integrity sha512-9OXV4ebpZAGdFfbV5HOt0YbVhGvVb104KshCA7u74YnsTkJp32FhdIVwoqmerRwNO4rRjwwvDjWZdhT80IrOzA== "@pagopa/io-react-native-zendesk@^0.3.28": version "0.3.28"