-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[NoQA] Feat/44313 edit settlement settings be integration #47309
[NoQA] Feat/44313 edit settlement settings be integration #47309
Conversation
@mountiny strangely for UpdateCardSettlementAccount I get 200, for UpdateCardSettlementFrequency - 400 (both screenshots in the checklist). For the second outcome I am not surprised though, bc I got an empty array for createExpensifyCard |
@mountiny should it be No QA? |
@allgandalf 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] |
ok opening it 😅 |
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 to test but i will wait for the comments to get addressed first
@@ -969,6 +969,14 @@ function getWorkspaceAccountID(policyID: string) { | |||
return policy.workspaceAccountID ?? 0; | |||
} | |||
|
|||
function getDomainNameForPolicy(policyID?: string): string { |
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.
function getDomainNameForPolicy(policyID?: string): string { | |
function getDomainNameForPolicy(policyID: string): string { |
Any reason for keeping this optional ?
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.
eslint complaining
if (!settlementBankAccountID) { | ||
return; | ||
} |
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.
Do we throw an error on the FE if this fails? I guess we just :do-nothing: if we return from here
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.
If it's better to send some invalid value - like -1 and get the error from the BE, I'm ok with that I can change it. But in my other PRs I was requested not to do so, so I also applied it here. But since we don't have this kind of error handling anywhere through the app I think we should rely on the BE errors.
cc @mountiny wdyt?
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.
Yeah I think its more common to do something and show error but I guess the problem with these is that its theoretical problem only, right? Like it should not happen that the bankAccountID is missing when we get this far?
Happy to change this to call with invalid value or the least we should do is to add some log
@allgandalf responded to your comments |
@allgandalf not sure, maybe try savings account from different bank (like Regions or Wells Fargo) |
@allgandalf or just try with the one account - just click on the currently selected account - the request should be sent properly and you should get a proper response (for me it worked) |
Dou you have any idea about the following error? Screen.Recording.2024-08-14.at.4.05.47.PM.mov |
Also, this has conflicts @koko57 |
@DylanDylann would be working on this PR, We switched each others PR's |
@allgandalf Ok, nvm 😅 |
wait aren't we, sorry i didn't understand your message here, did you mean the PR which was going to be raised today, if that's the case i can take this issue back no worries 😅 |
Yepp 😄 If you get any problem about connecting bank account, please raise it on Slack. Maybe I can help you |
Thanks, taking this issue again :)) |
@koko57 please resolve the conflicts once you get back, thanks :) |
@allgandalf conflicts resolved |
I tried with fresh account and the post request is successful: But i get 666 error from the |
@allgandalf is the error still that the account is used somewhere else? |
The error says that verfied bank account cant be used as settlement account on multiple domains, you can see the complete error in this video, I tried with a new account same error |
@allgandalf I will review this tomorrow |
@allgandalf I get the same problem Screen.Recording.2024-08-27.at.14.04.53.mov |
src/CONST.ts
Outdated
@@ -633,6 +633,10 @@ const CONST = { | |||
INBOX: 'inbox', | |||
}, | |||
|
|||
// TODO: change to expensify-policy once the new domain is available | |||
EXPENSIFY_POLICY_DOMAIN: 'expensify_policy', |
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.
Can you please change this to the dash format?
EXPENSIFY_POLICY_DOMAIN: 'expensify_policy', | |
EXPENSIFY_POLICY_DOMAIN: 'expensify-policy', |
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.
@mountiny done!
This also has conflicts @koko57 |
@allgandalf conflicts resolved! |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
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.
Cannot test this in Dev, still approving the PR, based on the conversation on slack
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.
We are working on adding another option for the VBBA testing account so we can test flows like this in staging, but we do not have to hold on that I think, this is not a new logic but rather reusing what we have in Olddot
✋ 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/mountiny in version: 9.0.26-1 🚀
|
🚀 Deployed to production by https://github.com/puneetlath in version: 9.0.26-6 🚀
|
Details
Fixed Issues
$ #44313
PROPOSAL:
Tests
PREREQUISITES: WorkspaceFeed/ all betas enabled, Expensify Card enabled, at least two bank accounts added, Expensify Card issued
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
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)Design
label so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop