Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(IT Wallet): [SIW-1404] Move CIE/NFC logic to XState #6508

Merged
merged 9 commits into from
Dec 9, 2024

Conversation

mastro993
Copy link
Contributor

@mastro993 mastro993 commented Dec 5, 2024

Short description

This PR moves the CIE/NFC logic from redux to the XState machine

List of changes proposed in this pull request

  • Removed identification store and sagas
  • Moved NFC and CIE checks to the XState machine

How to test

Try to obtain a new wallet using all the available identification methods (SPID, CieId, Cie+pin)

@pagopa-github-bot pagopa-github-bot changed the title [SIW-1404] Move CIE logic su XState chore(IT Wallet): [SIW-1404] Move CIE logic su XState Dec 5, 2024
@pagopa-github-bot
Copy link
Collaborator

pagopa-github-bot commented Dec 5, 2024

Affected stories

  • ⚙️ SIW-1404: [io-app] Rimuovere reducer "identification" e spostare i controlli NFC e CIE su xstate
    subtask of
    • SIW-1463: Refactor e Debito Tecnico

Generated by 🚫 dangerJS against 81af931

Copy link

codecov bot commented Dec 5, 2024

Codecov Report

Attention: Patch coverage is 53.84615% with 6 lines in your changes missing coverage. Please review.

Project coverage is 48.66%. Comparing base (4f204b4) to head (81af931).
Report is 853 commits behind head on master.

Files with missing lines Patch % Lines
ts/features/itwallet/machine/eid/actors.ts 0.00% 3 Missing ⚠️
ts/features/itwallet/machine/eid/selectors.ts 50.00% 2 Missing ⚠️
...let/identification/screens/cie/ItwCiePinScreen.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6508      +/-   ##
==========================================
+ Coverage   48.42%   48.66%   +0.23%     
==========================================
  Files        1488     1570      +82     
  Lines       31617    32170     +553     
  Branches     7669     7345     -324     
==========================================
+ Hits        15311    15654     +343     
- Misses      16238    16464     +226     
+ Partials       68       52      -16     
Files with missing lines Coverage Δ
ts/features/itwallet/common/saga/index.ts 0.00% <ø> (ø)
...s/features/itwallet/common/store/reducers/index.ts 83.33% <ø> (ø)
...n/screens/ItwIdentificationModeSelectionScreen.tsx 79.31% <100.00%> (ø)
ts/features/itwallet/machine/eid/context.ts 100.00% <ø> (ø)
ts/features/itwallet/machine/eid/machine.ts 97.50% <100.00%> (ø)
ts/store/reducers/index.ts 40.74% <ø> (ø)
...let/identification/screens/cie/ItwCiePinScreen.tsx 15.15% <0.00%> (ø)
ts/features/itwallet/machine/eid/selectors.ts 45.45% <50.00%> (ø)
ts/features/itwallet/machine/eid/actors.ts 2.00% <0.00%> (ø)

... and 1705 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1dbc898...81af931. Read the comment docs.

@mastro993 mastro993 self-assigned this Dec 5, 2024
@mastro993 mastro993 marked this pull request as ready for review December 5, 2024 15:06
@mastro993 mastro993 changed the title chore(IT Wallet): [SIW-1404] Move CIE logic su XState chore(IT Wallet): [SIW-1404] Move CIE/NFC logic to XState Dec 5, 2024
@gispada
Copy link
Collaborator

gispada commented Dec 6, 2024

Do you think we can move the CIE capabilities check earlier in the flow? The CIE+PIN button pops in shifting the other buttons:

file.mp4

@mastro993
Copy link
Contributor Author

Do you think we can move the CIE capabilities check earlier in the flow? The CIE+PIN button pops in shifting the other buttons:

file.mp4

You are right. I was testing on iOS where the NFC check is almost instant and I didn't notice that. Addressed here: ed31816, I've also renamed some function/variable for consistency.

Copy link
Collaborator

@gispada gispada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mastro993 mastro993 merged commit 8465717 into master Dec 9, 2024
12 checks passed
@mastro993 mastro993 deleted the SIW-1404-move-cie-logic-to-xstate branch December 9, 2024 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants