Repository navigation
[Internal QA] Fix duplicate company cards showing up - #95611
Conversation
| for (const cardName of filterAmexDirectParentCard(accountList ?? [], feedName)) { | ||
| const normalizedName = normalizeCardName(cardName); | ||
| if (coveredNames.has(normalizedName) || coveredEncrypted.has(cardName) || entriesMap.has(normalizedName)) { | ||
| const encryptedCardNumber = cardList?.[cardName] ?? cardName; |
There was a problem hiding this comment.
This is the main difference: Checking the encryptedCardNumber instead of the cardName
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 69cfbae247
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
For testing this, its hard to create cards that have to fallback to last 5 instead of last 4, so I supportaled into the broken account using the staging servers to ensure this fixed the issue |
|
Indeed, I think I never succeeded setting up company Visa cards commercial feed. I asked in slack if someone can take over review. |
|
@NicolasBonet Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Before fix:
After fix:
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 NicolasBonet has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/NicolasBonet in version: 9.4.32-0 🚀
|
|
🤖 I reviewed the changes in this PR against the help site articles under No help site changes are required. This PR is a targeted bug fix to internal card-deduplication logic in Why no docs update is needed:
Since no article content is affected, I did not create a draft docs PR.
|
|
yep, looks good! |
|
🚀 Deployed to production by https://github.com/grgia in version: 9.4.32-3 🚀
Bundle Size Analysis (Sentry): |


Explanation of Change
The main issue here, is that the BE doesn't always return the card name with the last 4 digits (IE 1234xxxxxxxx6789). If the last 4 collide with another cards last 4, we return the last 5 digits. This breaks the name comparison in the final loop, since the values in the
existingNamesset use 4 digits:Fixed Issues
$ #95498
Tests
N/A, cant be tested by QA
Internal testing:
Supportal into the account that reported the issue (slack link above)
Go to company cards
Ensure there are 11 unassigned cards
Ensure that when you search for the reported card number on the company cards page, only the assigned card appears
Offline tests
N/A
QA Steps
N/A
PR Author Checklist
Reviewer Checklist
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick).Avatar, I verified the components usingAvatarhave been tested & I retested again)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: HybridApp
Android: mWeb Chrome
iOS: HybridApp
iOS: mWeb Safari
MacOS: Chrome / Safari
Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari