Skip to content

Conversation

@tomkp
Copy link
Owner

@tomkp tomkp commented Dec 28, 2025

Summary

  • Add readPseApplications() helper function that encapsulates PSE selection and record reading
  • Add PseAppInfo, PseRecordData, and PseReadResult interfaces
  • Refactor listApps() to use the shared helper
  • Refactor cardInfo() to use the shared helper
  • Refactor dumpCard() to use the shared helper
  • Add tests for readPseApplications()

This reduces code duplication across three functions that all performed the same PSE reading pattern.

Test plan

  • All 116 tests pass (3 new tests added)
  • Lint passes
  • Existing behavior preserved

Closes #73

- Add readPseApplications() helper function that encapsulates PSE
  selection and record reading
- Add PseAppInfo, PseRecordData, and PseReadResult interfaces
- Refactor listApps() to use the shared helper
- Refactor cardInfo() to use the shared helper
- Refactor dumpCard() to use the shared helper
- Add tests for readPseApplications()

This reduces code duplication across three functions that all performed
the same PSE reading pattern.
@tomkp tomkp merged commit 934b020 into master Dec 28, 2025
2 checks passed
@tomkp tomkp deleted the refactor/extract-pse-reading-logic branch December 28, 2025 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extract shared PSE reading logic to reduce duplication

2 participants