-
Notifications
You must be signed in to change notification settings - Fork 3k
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
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks good so far
src/libs/actions/PaymentMethods.js
Outdated
}, | ||
]; | ||
|
||
API.write('MakeDefaultPaymentMethod', {password, bankAccountID, fundID}, {optimisticData, failureData}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for cleaning this up 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 😅
src/pages/settings/Payments/PaymentsPage/paymentsPagePropTypes.js
Outdated
Show resolved
Hide resolved
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clean PR 🔥
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving final review / merge to you @srikarparsi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
✋ 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:billingcard
andvalidator:wallet
)Make default payment method
, enter the account passwordUntitled_.Jul.13.2022.11_35.AM.mp4
PR Review Checklist
Contributor (PR Author) Checklist
### Fixed Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
filesSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
displayName
propertythis
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is 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 Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
).src/languages/*
filesSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
have been tested & I retested again)/** comment above it */
displayName
propertythis
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is 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