Refactor PLAID_DATA and fix plaid bankAccounts selector - #11750
Conversation
418f4f0 to
b34d8c6
Compare
…cessarily when other attributes of PLAID_DATA change
b34d8c6 to
ee52b44
Compare
| */ | ||
| selectAccount(plaidAccountID) { | ||
| const selectedPlaidBankAccount = _.findWhere(this.getPlaidBankAccounts(), {plaidAccountID}); | ||
| if (!selectedPlaidBankAccount) { |
There was a problem hiding this comment.
Yep, it was a mix of several things that I fixed in this PR. Not it can't be undefined anymore.
a291186 to
4a298ca
Compare
4f1aa9e to
5f0722f
Compare
5f0722f to
b6e47e8
Compare
|
|
|
Review in progress:
ScreenshotsWebAdd a PBA (Plaid) Screen.Recording.2022-10-12.at.16.28.12.movAdd a VBA (Plaid) Mobile Web - ChromeScreen.Recording.2022-10-12.at.20.27.03.movMobile Web - SafariDesktopiOSScreen.Recording.2022-10-12.at.20.38.05.movAndroidScreen.Recording.2022-10-12.at.20.19.54.mov |
|
@marcochavezf Updated! |
@yuwenmemon I think we (author and reviewer) now should add the screenshots for all platforms |
|
I'll add screenshots |
|
Added! |
| /** Contains plaid data */ | ||
| plaidData: plaidDataPropTypes, | ||
|
|
||
| selectedPlaidAccountID: PropTypes.string, |
There was a problem hiding this comment.
The reviewer checklist says that all props are defined accurately and each prop has a /** comment above it */, although it's under _ If a new component is created I verified that:_ so not sure if this should be a blocker or not
There was a problem hiding this comment.
Good catch, we should probably still do that.
| error: PropTypes.string, | ||
| shouldShowSuccess: PropTypes.bool, | ||
| isLoading: PropTypes.bool, | ||
| plaidAccountID: PropTypes.string, |
There was a problem hiding this comment.
Maybe all these need to be documented too
| @@ -76,7 +78,11 @@ class AddPersonalBankAccountPage extends React.Component { | |||
| * @param {Object} values - form input values passed by the Form component | |||
|
Tested both flows (PBA and VBA) on every platform, added the screenshots and videos in this comment. |
There's a missing screenshot for the |
luacmartins
left a comment
There was a problem hiding this comment.
LGTM. I left a clean up comment and I think the test steps could be more descriptive.
| }); | ||
| plaidAccessToken: this.props.plaidData.plaidAccessToken, | ||
| }; | ||
| ReimbursementAccount.updateReimbursementAccountDraft(bankAccountData); |
There was a problem hiding this comment.
NAB we can clean this up later, but I don't think that we need this since Form automatically updates the draft data if we pass shouldSaveDraft to each input
| ReimbursementAccount.updateReimbursementAccountDraft(bankAccountData); | |
| ReimbursementAccount.updateReimbursementAccountDraft(bankAccountData); |
Refactor PLAID_DATA and fix plaid bankAccounts selector (cherry picked from commit 6f0d806)
…-11750 🍒 Cherry pick PR #11750 to staging 🍒
|
🚀 Cherry-picked to staging by @yuwenmemon in version: 1.2.13-5 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
|
🚀 Deployed to production by @yuwenmemon in version: 1.2.13-5 🚀
|
Refactor PLAID_DATA and fix plaid bankAccounts selector
|
🚀 Cherry-picked to staging by https://github.com/AndrewGable in version: 1.3.28-2 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |





Details
Fixed Issues
$ #11554
$ #11769
Tests
PR Review Checklist
PR Author Checklist
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*filesSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** 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(themeColors.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)PR Reviewer Checklist
The reviewer will copy/paste it into a new comment and complete it after the author checklist is completed
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick).src/languages/*filesSTYLE.md) were followedAvatar, 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(themeColors.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)QA Steps
Screenshots
Web
Add a personal bank account via Plaid
2022-10-12_21-35-54.mp4
Add a VBBA via Plaid. Make sure no error occurs
vbba.mp4
Mobile Web - Chrome
Screen.Recording.2022-10-12.at.20.27.03.mov
Mobile Web - Safari
Kapture.2022-10-12.at.16.19.05.mp4
Desktop
Kapture.2022-10-12.at.16.24.13.mp4
iOS
Kapture.2022-10-12.at.17.02.47.mp4
Android
Kapture.2022-10-12.at.17.47.30.mp4