Repository navigation
Allow to refresh plaid accountList with existing accessToken when trying to assign - #72757
Conversation
Codecov Report❌ Patch coverage is
... and 8 files with indirect coverage changes 🚀 New features to boost your workflow:
|
1a2b819 to
881e5d8
Compare
881e5d8 to
ff470f6
Compare
|
@MarioExpensify 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] |
|
@mountiny any idea why eslint is complaining? |
|
LGTM |
mountiny
left a comment
There was a problem hiding this comment.
Looks good but web PR has been merged, waiting for deployed
|
Web PR got deployed to staging. Unholding. |
|
updated! |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
| // Refetch plaid card list | ||
| if (!isFeedExpired && plaidAccessToken) { | ||
| const country = selectedFeedCompanyCardsData?.country ?? ''; | ||
| importPlaidAccounts('', selectedFeed, '', country, getDomainNameForPolicy(policyID), '', undefined, undefined, plaidAccessToken); |
There was a problem hiding this comment.
❌ PERF-6 (docs)
In useEffect, useMemo, and useCallback, specify individual object properties as dependencies instead of passing entire objects.
The handleAssignCard function should specify individual properties as dependencies rather than using the entire objects:
const handleAssignCard = useCallback(() => {
// ... existing logic
}, [
isActingAsDelegate,
selectedFeed,
isOffline,
policy?.employeeList,
cardFeeds?.settings?.companyCards,
cardFeeds?.settings?.oAuthAccountDetails,
policyID,
filteredCardList,
policy?.outputCurrency,
countryByIp
]);|
Review completed. Found 1 performance-related issue that should be addressed. |
|
If you want to give it a test in staging i can move it ahead now that deploy is close |
mountiny
left a comment
There was a problem hiding this comment.
Would be good to look into the ai comment hut non blocking imho
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
@nkuoch can we check it off? No need to QA this, right? |
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.2.34-0 🚀
|
|
Yep you can check it off, I'll QA myself |
|
QAd, all good! |
|
🚀 Deployed to production by https://github.com/cristipaval in version: 9.2.34-2 🚀
|
Explanation of Change
Allow to refresh plaid available cards when opening AssignCard page.
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/552935
Part of https://github.com/Expensify/Expensify/issues/555804#issuecomment-3396632979
Tests
Tested with https://github.com/Expensify/Web-Expensify/pull/49016
Imported a plaid card feed in a workspace
Removed oAuthAccountDetails from db:
Clicked on

Assign cardbutton, and made sure it calledImportPlaidAccountsAnd then could assign a card.
Re-clicking on
Assign cardbutton later didn't callImportPlaidAccountsagain.Offline tests
N/A
QA Steps
None. Please just ping me
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.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: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop