Refactor SetWalletLinkedAccount#9828
Conversation
|
Looks like you modified Instead, all new API commands should use API.js, and follow our guidelines for writing new API commands. Unsure if your change is okay? Drop a note in #expensify-open-source! |
…llet-linked-account # Conflicts: # src/libs/deprecatedAPI.js
thienlnam
left a comment
There was a problem hiding this comment.
Everything looks good so far
| }, | ||
| ]; | ||
|
|
||
| API.write('MakeDefaultPaymentMethod', {password, bankAccountID, fundID}, {optimisticData, failureData}); |
There was a problem hiding this comment.
I guess this is more of a NAB, but any reason this PR doesn't list the onyx data in the function call like https://github.com/Expensify/App/pull/9589/files?
There was a problem hiding this comment.
No particular reason but I like the idea of keeping it consistent so I've updated to have the onyx data in the function call vs as separate variables 👍🏼
| @@ -0,0 +1,12 @@ | |||
| import PropTypes from 'prop-types'; | |||
|
|
|||
| export default PropTypes.shape({ | |||
There was a problem hiding this comment.
Thanks for cleaning this up 😄
Beamanator
left a comment
There was a problem hiding this comment.
Looking good, just a few tiny NABs (haven't fully tested yet)
Just a tiny question, when creating cardPropTypes why not make cardListPropTypes instead? I don't think it reduce the amount of code written, just wondering 😅
That's fair. Updated to |
Yeah trueeee I guess I was thinking in import PropTypes from 'prop-types';
export default PropTypes.arrayOf(PropTypes.shape({
/** The name of the institution (bank of america, etc) */
cardName: PropTypes.string,
/** The masked credit card number */
cardNumber: PropTypes.string,
/** The ID of the card in the cards DB */
cardID: PropTypes.number,
}));I'm happy to drop this idea though, just a slight personal preference :D |
This reverts commit 1be91e2. # Conflicts: # src/pages/settings/Payments/PaymentsPage/paymentsPagePropTypes.js
Ah, yeah, that'd be a good way to do it as well. However, I think we'll just stay consistent with |
thienlnam
left a comment
There was a problem hiding this comment.
Leaving final review / merge to you @srikarparsi
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to production by @luacmartins in version: 1.1.85-8 🚀
|
Hold on: https://github.com/Expensify/Web-Expensify/pull/34270
Details
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/216152
Tests
generator:bankaccount,generator:billingcardandvalidator:wallet)Make default payment method, enter the account passwordUntitled_.Jul.13.2022.11_35.AM.mp4
PR Review Checklist
Contributor (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 */displayNamepropertythisproperly 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 Contributor+ 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 */displayNamepropertythisproperly 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
Make default payment method, enter the account passwordMake default payment method, enter the account passwordScreenshots
Web
Desktop