-
-
Notifications
You must be signed in to change notification settings - Fork 919
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
fix(finance.bic): remove hardcoded elements and simplify function #1171
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1171 +/- ##
=======================================
Coverage 99.62% 99.62%
=======================================
Files 2153 2153
Lines 236547 236543 -4
Branches 979 979
=======================================
- Hits 235656 235654 -2
+ Misses 870 868 -2
Partials 21 21
|
One regex seems to be failing. Please check the regex for issues. |
Edit I found this "official" regex: https://stackoverflow.com/a/52043851/4573065 |
According to https://wise.com/gb/swift-codes/bic-swift-code-checker the location code is 0-9 A-Z. I checked the failed bic
Supported by wikipedia https://en.wikipedia.org/wiki/ISO_9362 I found the official (demo) standard https://cdn.standards.iteh.ai/samples/84108/21078408ed25469391d0cf6c5d1b6ca9/ISO-9362-2022.pdf and it also does not say anything about those exclusions mentioned on German wiki. |
Then use a simple regex. I would even remove the countryCodes from the regex and check them separately (e.g. using substring). |
# Conflicts: # test/__snapshots__/finance.spec.ts.snap
# Conflicts: # test/__snapshots__/finance.spec.ts.snap
Rebased and issues fixed. Is it ready to merge? |
The suggested change by @ST-DDT was implemented into the test. Is this ready for merge? |
Fixes #1159