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

feat: [IOBP-863,IOBP-864] Removed legacy wallet & payments features #6210

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

Hantex9
Copy link
Contributor

@Hantex9 Hantex9 commented Sep 25, 2024

Short description

This PR removes all elements related to the old wallet, payment flow, and onboarding process. It includes the deletion of screens, components, sagas, reducers, and other elements associated with these deprecated features.

N.B: The goal of this PR is solely to remove the legacy payments flow and does not include refactoring the deprecated components displayed on some screens such as IDPay. Please keep this in mind when reviewing the PR.

List of changes proposed in this pull request

  • A lot of deletion and code removal ☠️

How to test

To test this PR, both the new payment flow and the onboarding flow must work correctly. Additionally, it's important to test a payment initiated from the Message screen. @forrest57 @Vangaorth, this PR cannot be merged until it is approved by the communication team.
Please test everything both in local environment and UAT env. (by enabling the feature flag Ambiente di test pagoPA and building the app with the .env.production variables)

@Hantex9 Hantex9 added IO-Bonus e pagamenti IO - Bonus e pagamenti 💀 Dead matter Graphic assets or chunks of code that are no longer referenced or needed labels Sep 25, 2024
@Hantex9 Hantex9 requested review from dmnplb and a team as code owners September 25, 2024 10:01
@pagopa-github-bot
Copy link
Collaborator

pagopa-github-bot commented Sep 25, 2024

Warnings
⚠️

Multiple stories with different types are associated with this Pull request.
Only one tag will be added, following the order: feature > bug > chore

Affected stories

  • 🌟 IOBP-863: Rimozione flussi legacy di onboarding
    subtask of
    • IOBP-862: Rimozione flusso legacy Portafoglio
  • 🌟 IOBP-864: Rimozione flussi legacy di pagamento
    subtask of
    • IOBP-862: Rimozione flusso legacy Portafoglio

Generated by 🚫 dangerJS against bda1392

@Hantex9 Hantex9 marked this pull request as draft September 25, 2024 10:06
Copy link

codecov bot commented Nov 5, 2024

Codecov Report

Attention: Patch coverage is 7.85714% with 129 lines in your changes missing coverage. Please review.

Project coverage is 46.08%. Comparing base (4f204b4) to head (bda1392).
Report is 673 commits behind head on master.

Files with missing lines Patch % Lines
ts/sagas/legacyWallet/pagopaApis.ts 0.00% 23 Missing ⚠️
...s/transaction/store/saga/fetchPspRequestHandler.ts 0.00% 20 Missing ⚠️
.../features/payments/transaction/store/saga/index.ts 0.00% 18 Missing ⚠️
...ures/payments/transaction/store/selectors/index.ts 27.27% 16 Missing ⚠️
...ction/store/saga/fetchTransactionRequestHandler.ts 0.00% 13 Missing ⚠️
...tion/store/saga/fetchTransactionsRequestHandler.ts 0.00% 13 Missing ⚠️
...tures/payments/transaction/store/reducers/index.ts 20.00% 12 Missing ⚠️
...ents/barcode/screens/PaymentsBarcodeScanScreen.tsx 0.00% 6 Missing ⚠️
...ts/barcode/screens/PaymentsBarcodeChoiceScreen.tsx 0.00% 2 Missing ⚠️
...out/screens/WalletPaymentInputFiscalCodeScreen.tsx 0.00% 2 Missing ⚠️
... and 4 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6210      +/-   ##
==========================================
- Coverage   48.42%   46.08%   -2.35%     
==========================================
  Files        1488     1599     +111     
  Lines       31617    31884     +267     
  Branches     7669     7426     -243     
==========================================
- Hits        15311    14694     -617     
- Misses      16238    17139     +901     
+ Partials       68       51      -17     
Files with missing lines Coverage Δ
ts/features/barcode/screens/BarcodeScanScreen.tsx 1.42% <ø> (-0.03%) ⬇️
ts/features/design-system/core/DSLegacyAdvice.tsx 66.66% <ø> (ø)
ts/features/design-system/core/DSListItems.tsx 55.55% <ø> (+28.88%) ⬆️
...components/MessageDetail/MessageDetailsPayment.tsx 100.00% <ø> (ø)
...ents/MessageDetail/MessageDetailsPaymentButton.tsx 66.66% <ø> (-4.77%) ⬇️
...nents/MessageDetail/MessageDetailsStickyFooter.tsx 80.45% <ø> (-3.76%) ⬇️
...es/components/MessageDetail/MessagePaymentItem.tsx 85.48% <ø> (-7.74%) ⬇️
...tures/messages/saga/handlePaymentUpdateRequests.ts 3.70% <ø> (-0.47%) ⬇️
ts/features/messages/saga/index.ts 0.00% <ø> (ø)
ts/features/messages/utils/index.ts 91.42% <100.00%> (-8.58%) ⬇️
... and 36 more

... and 1525 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 0881665...bda1392. Read the comment docs.

@Hantex9 Hantex9 marked this pull request as ready for review November 5, 2024 14:40
Copy link
Contributor

@LeleDallas LeleDallas left a comment

Choose a reason for hiding this comment

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

Great work, it works as expected! 🎊

What I suggest here is to remove some unused files in payments folder:

  • ts/features/payments/checkout/types/PaymentHistory.ts
  • ts/features/payments/checkout/types/WalletPaymentPspSortType.ts
  • ts/features/payments/common/components/PaymentCardBankLogo.tsx
  • ts/features/payments/home/components/PaymentsListItemTransaction.tsx

Use npx knip to double check them

// wallets with undefined creation dates... so the check
// is unnecessary.

isNaN(a.created as any) || isNaN(b.created as any)
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of use any here what do you think about this: isNaN(Number(a.created)) || isNaN(Number(b.created)) ? Will this approach be more type-safe?


// the error is undefined in case we weren't able to decode it, it should be
// interpreted as a generic error
export const paymentVerifica = createAsyncAction(
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you confirm if it was intentional to leave this declaration in Italian?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💀 Dead matter Graphic assets or chunks of code that are no longer referenced or needed IO-Bonus e pagamenti IO - Bonus e pagamenti
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants