hyperswitch-web icon indicating copy to clipboard operation
hyperswitch-web copied to clipboard

refactor: use shared country/state list instead of S3 + local backups

Open aritro2002 opened this issue 3 months ago • 1 comments

Type of Change

  • [ ] Bugfix
  • [ ] New feature
  • [ ] Enhancement
  • [x] Refactoring
  • [ ] Dependency updates
  • [ ] Documentation
  • [ ] CI/CD

Description

This PR refactors the handling of country and state data by removing the S3 fetch logic and local backup variables, and instead directly using the shared code that already provides the complete list. This simplifies the implementation, reduces redundant code, and ensures a single source of truth for country and state information across the codebase.

How did you test it?

I tested it by removing the dynamic fields and adding custom values for billing. image

Checklist

  • [x] I ran npm run re:build
  • [x] I reviewed submitted code
  • [ ] I added unit tests for my changes where possible

aritro2002 avatar Sep 22 '25 11:09 aritro2002

Review changes with  SemanticDiff

Changed Files
File Status
  src/Components/AddressPaymentInput.res Unsupported file format
  src/Components/DynamicFields.res Unsupported file format
  src/Country.res Unsupported file format
  src/CountryStateDataRefs.res Unsupported file format
  src/LoaderController.res Unsupported file format
  src/Payments/PaymentMethodsRecord.res Unsupported file format
  src/Payments/PaymentMethodsWrapper.res Unsupported file format
  src/States.json  0% smaller
  src/Types/PaymentType.res Unsupported file format
  src/Utilities/DynamicFieldsUtils.res Unsupported file format
  src/Utilities/PaymentUtils.res Unsupported file format
  src/Utilities/S3Utils.res Unsupported file format
  src/Utilities/Utils.res Unsupported file format
  webpack.common.js  0% smaller

semanticdiff-com[bot] avatar Sep 22 '25 11:09 semanticdiff-com[bot]