[No QA] [TS Migration] Migrate PaymentMethods.js to TypeScript#29074
[No QA] [TS Migration] Migrate PaymentMethods.js to TypeScript#29074srikarparsi merged 12 commits intoExpensify:mainfrom
Conversation
rezkiy37
left a comment
There was a problem hiding this comment.
Left a comment. In general, LGTM.
|
@JKobrynski one more thing, please add return types to functions as its our convention, besides that LGTM 👍 |
src/libs/actions/PaymentMethods.ts
Outdated
|
|
||
| type PaymentCardParams = {expirationDate: string; cardNumber: string; securityCode: string; nameOnCard: string; addressZipCode: string}; | ||
|
|
||
| type FilterMethodPaymentType = typeof CONST.PAYMENT_METHODS.DEBIT_CARD | typeof CONST.PAYMENT_METHODS.BANK_ACCOUNT | null; |
There was a problem hiding this comment.
Let's define it in src/types/onyx/WalletTransfer file and import it here
src/libs/actions/PaymentMethods.ts
Outdated
| return onyxData; | ||
| } | ||
|
|
||
| type MakeDefaultPaymentMethodParams = { |
There was a problem hiding this comment.
You can move params type to function body (examples in Fabio's PR)
src/libs/actions/PaymentMethods.ts
Outdated
| }); | ||
| } | ||
|
|
||
| type TransferWalletBalanceParameters = Partial<Record<ValueOf<typeof CONST.PAYMENT_METHOD_ID_KEYS>, number | undefined>>; |
There was a problem hiding this comment.
You can move params type to function body (examples in Fabio's PR)
|
@blazejkustra PR updated, feel free to take another look 😄 |
|
@srikarparsi 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] |
|
Hi @JKobrynski, looks like there's a conflict, also could you please include the testing steps in the original description? |
|
@srikarparsi done! |
Reviewer Checklist
Screenshots/VideosMobile Web - ChromeMobile Web - SafariDesktopiOSAndroid |
|
✋ 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 staging by https://github.com/srikarparsi in version: 1.3.87-0 🚀
|
1 similar comment
|
🚀 Deployed to staging by https://github.com/srikarparsi in version: 1.3.87-0 🚀
|
|
it looks like this may have caused a regression here #30024, could someone help confirm? #30024 (comment) |
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.3.87-12 🚀
|
|
🚀 Deployed to staging by https://github.com/srikarparsi in version: 1.3.88-0 🚀
|
|
🚀 Deployed to production by https://github.com/chiragsalian in version: 1.3.88-11 🚀
|
| Onyx.set(ONYXKEYS.FORMS.ADD_DEBIT_CARD_FORM, { | ||
| isLoading: false, | ||
| errors: undefined, | ||
| setupComplete: true, |


Details
Fixed Issues
$ #24911
PROPOSAL: N/A
Tests
Offline tests
N/A
QA Steps
N/A
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.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)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
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android