Skip to content

refactor: [IEG-2929] Replace fp-ts with vanilla ts in CGN#8246

Open
LeleDallas wants to merge 7 commits into
masterfrom
IEG-2929
Open

refactor: [IEG-2929] Replace fp-ts with vanilla ts in CGN#8246
LeleDallas wants to merge 7 commits into
masterfrom
IEG-2929

Conversation

@LeleDallas

Copy link
Copy Markdown
Contributor

Short description

This pull request focuses on simplifying the codebase by removing unnecessary functional programming dependencies (such as fp-ts's Option, Either, and pipe) and replacing them with more idiomatic and straightforward TypeScript code.

List of changes proposed in this pull request

  • Replaced uses of fp-ts's Option, Either, and pipe with native TypeScript constructs and simplified conditional logic
  • Updated saga tests to remove fp-ts constructs, using plain objects for responses and errors, and adjusted assertions accordingly
  • Simplified and clarified error handling by throwing and catching native Error objects instead of wrapping them in Either or custom types, and using a consistent approach for network and generic errors.

How to test

Ensure CGN flow has no regression in all screens

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

PR Title Validation for conventional commit type

All good! PR title follows the conventional commit type.

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Jira Pull Request Link

This Pull Request refers to Jira issues:

@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.55556% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.95%. Comparing base (aad67c0) to head (6b5b82f).

Files with missing lines Patch % Lines
...pp/ts/features/bonus/cgn/store/reducers/details.ts 40.00% 3 Missing ⚠️
...p/ts/features/bonus/cgn/hooks/useSpecialCtaCgn.tsx 0.00% 2 Missing ⚠️
...ga/networking/activation/getBonusActivationSaga.ts 75.00% 1 Missing and 1 partial ⚠️
...etworking/eyca/activation/getEycaActivationSaga.ts 93.54% 1 Missing and 1 partial ⚠️
...ts/features/bonus/cgn/components/CgnWalletCard.tsx 50.00% 0 Missing and 1 partial ⚠️
...res/bonus/cgn/components/merchants/utils/index.tsx 85.71% 0 Missing and 1 partial ⚠️
...a/orchestration/activation/handleActivationSaga.ts 0.00% 0 Missing and 1 partial ⚠️
...n/screens/merchants/CgnMerchantsListByCategory.tsx 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8246      +/-   ##
==========================================
+ Coverage   62.77%   62.95%   +0.17%     
==========================================
  Files        1952     1952              
  Lines       37085    37085              
  Branches     6205     6205              
==========================================
+ Hits        23280    23346      +66     
+ Misses      12419    12358      -61     
+ Partials     1386     1381       -5     
Files with missing lines Coverage Δ
...cgn/components/detail/eyca/EycaDetailComponent.tsx 100.00% <100.00%> (ø)
...nus/cgn/components/merchants/ModuleCgnDiscount.tsx 100.00% <100.00%> (+7.14%) ⬆️
...features/bonus/cgn/saga/networking/bucket/index.ts 95.23% <100.00%> (ø)
...gn/saga/networking/categories/cgnCategoriesSaga.ts 100.00% <100.00%> (ø)
...n/saga/networking/details/getCgnInformationSaga.ts 100.00% <100.00%> (ø)
...working/eyca/activation/getEycaActivationStatus.ts 100.00% <100.00%> (ø)
.../cgn/saga/networking/eyca/details/getEycaStatus.ts 92.85% <100.00%> (ø)
...a/networking/merchants/cgnGetMerchantsCountSaga.ts 100.00% <100.00%> (ø)
...cgn/saga/networking/merchants/cgnMerchantDetail.ts 100.00% <100.00%> (ø)
...ga/networking/merchants/cgnOfflineMerchantsSaga.ts 100.00% <100.00%> (ø)
... and 15 more

Continue to review full report in Codecov by Harness.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@LeleDallas LeleDallas marked this pull request as ready for review July 8, 2026 08:01
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.

1 participant