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

refactor(cards,router): Remove duplicated card number interface #4404

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

yongjoon-km
Copy link

@yongjoon-km yongjoon-km commented Apr 21, 2024

Type of Change

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

Description

The CardNumber interface has a duplicated method with the same functionality. Removed one.
closes #4442

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables
  1. crates/cards/src/validate
  2. crates/router/src/core/blocklist/utils

Motivation and Context

How did you test it?

The methods get_extended_card_bin() and get_card_extended_bin() are identical and thus redundant. It is recommended to keep one and remove the other to avoid confusion.

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible
  • I added a CHANGELOG entry if applicable

@yongjoon-km yongjoon-km requested review from a team as code owners April 21, 2024 02:57
Copy link
Member

@vspecky vspecky left a comment

Choose a reason for hiding this comment

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

Hey @yongjoon-km, thanks for the PR!

Can you remove the get_card_extended_bin() function instead (keep get_extended_card_bin()). This is to ensure consistent naming of the extended card bin across the codebase.

@yongjoon-km
Copy link
Author

Hey @yongjoon-km, thanks for the PR!

Can you remove the get_card_extended_bin() function instead (keep get_extended_card_bin()). This is to ensure consistent naming of the extended card bin across the codebase.

I will change to use get_extended_card_bin() instead of get_card_extended_bin() Thanks for your feedback.

@yongjoon-km yongjoon-km force-pushed the deprecate-duplicated-card-interface branch from d2027aa to 9bba816 Compare April 22, 2024 10:58
@yongjoon-km yongjoon-km force-pushed the deprecate-duplicated-card-interface branch from 9bba816 to 7d2b90a Compare April 22, 2024 10:59
Copy link
Member

@vspecky vspecky left a comment

Choose a reason for hiding this comment

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

@yongjoon-km LGTM! Please create and link an Issue to fix the failing CI check.

@vspecky vspecky added S-waiting-on-review Status: This PR has been implemented and needs to be reviewed C-refactor Category: Refactor A-payments Area: payments labels Apr 23, 2024
@SanchithHegde
Copy link
Member

Hey @yongjoon-km, just so you're aware, you don't need to repetitively merge main branch into your PR, the merge queue will handle that for you.

@yongjoon-km
Copy link
Author

Hey @yongjoon-km, just so you're aware, you don't need to repetitively merge main branch into your PR, the merge queue will handle that for you.

Oh.. I didn't know that. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-payments Area: payments C-refactor Category: Refactor S-waiting-on-review Status: This PR has been implemented and needs to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove duplicated card number interface
4 participants