io-app icon indicating copy to clipboard operation
io-app copied to clipboard

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

Open Hantex9 opened this issue 1 year ago • 2 comments
trafficstars

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.

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.

Hantex9 avatar Sep 25 '24 10:09 Hantex9

Warnings
:warning:

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 :no_entry_sign: dangerJS against b3342eb56831232edd3adf9133c0b361f014b82a

pagopa-github-bot avatar Sep 25 '24 10:09 pagopa-github-bot

@Hantex9 If it helps, I've just run npx knip to find all the unused components. Some of them are false positives (because they're currently in use), but I see a lot of new entries compared to the past. For example:

  • ts/components/PreferencesListItem.tsx
  • ts/components/ScreenHeader.tsx
  • ts/components/SelectCalendarModal.tsx
  • ts/components/screens/DarkLayout.tsx
  • ts/components/screens/EdgeBorderComponent.tsx and so on…

Give it a look.

PS: I'm glad this time has come ✌🏻

dmnplb avatar Sep 25 '24 12:09 dmnplb

Codecov Report

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

Project coverage is 47.69%. Comparing base (4f204b4) to head (b3342eb). Report is 728 commits behind head on master.

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6210      +/-   ##
==========================================
- Coverage   48.42%   47.69%   -0.74%     
==========================================
  Files        1488     1609     +121     
  Lines       31617    32225     +608     
  Branches     7669     7426     -243     
==========================================
+ Hits        15311    15370      +59     
- Misses      16238    16802     +564     
+ Partials       68       53      -15     
Files with missing lines Coverage Δ
ts/features/barcode/screens/BarcodeScanScreen.tsx 1.42% <ø> (-0.03%) :arrow_down:
ts/features/design-system/core/DSLegacyAdvice.tsx 50.00% <ø> (ø)
ts/features/design-system/core/DSListItems.tsx 55.55% <ø> (+28.88%) :arrow_up:
...components/MessageDetail/MessageDetailsPayment.tsx 100.00% <ø> (ø)
...ents/MessageDetail/MessageDetailsPaymentButton.tsx 66.66% <ø> (-4.77%) :arrow_down:
...nents/MessageDetail/MessageDetailsStickyFooter.tsx 80.45% <ø> (-3.76%) :arrow_down:
...es/components/MessageDetail/MessagePaymentItem.tsx 85.48% <ø> (-7.74%) :arrow_down:
...tures/messages/saga/handlePaymentUpdateRequests.ts 3.70% <ø> (-0.47%) :arrow_down:
ts/features/messages/saga/index.ts 0.00% <ø> (ø)
ts/features/messages/utils/index.ts 91.42% <100.00%> (-8.58%) :arrow_down:
... and 39 more

... and 1606 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 5ce870d...b3342eb. Read the comment docs.

codecov[bot] avatar Nov 05 '24 14:11 codecov[bot]

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

That's cool! Addressed into d96e40440c527b3beda72cf471552318cbe001ff

Hantex9 avatar Nov 06 '24 09:11 Hantex9

This PR is scheduled to be merged on Monday 18th November 2024 🗓️

Hantex9 avatar Nov 13 '24 15:11 Hantex9