-
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
Fix optimistic merchant #32200
Fix optimistic merchant #32200
Conversation
@aimane-chnaif 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] |
Job 1 is still running. Something wrong with this PR or main? |
ok so failed finally |
@dukenv0307 are you working on fixing unit test? |
@dukenv0307 Any updates of that failed test? |
We ended up reverting the original PR because it was blocking the deploy, we can work on this PR to add the code we reverted and fix the bug we found. |
@aimane-chnaif @pecanoro Sorry for the delay, it's too late in my timezone yesterday. Updated PR to contain the previous PR changed and fixed test. |
@dukenv0307 please merge main |
@aimane-chnaif Updated. |
@dukenv0307 I am not able to split. Confirmed not happening on main Screen.Recording.2023-12-01.at.4.36.57.PM.mov |
Co-authored-by: Aimane Chnaif <96077027+aimane-chnaif@users.noreply.github.com>
@aimane-chnaif Thanks, updated. |
src/libs/actions/IOU.js
Outdated
@@ -919,12 +919,13 @@ function requestMoney( | |||
* @param {Number} amount - always in the smallest unit of the currency | |||
* @param {String} comment | |||
* @param {String} currency | |||
* @param {String} merchant |
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.
also reorder this
src/libs/actions/IOU.js
Outdated
*/ | ||
function splitBillAndOpenReport(participants, currentUserLogin, currentUserAccountID, amount, comment, currency, category) { | ||
const {splitData, splits, onyxData} = createSplitsAndOnyxData(participants, currentUserLogin, currentUserAccountID, amount, comment, currency, category); | ||
function splitBillAndOpenReport(participants, currentUserLogin, currentUserAccountID, amount, comment, currency, category, merchant = '') { |
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 see that empty string is set as merchant default value here.
And not set in all other places.
Can you make them consistent? What issue happens if default value not set?
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 missed 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.
Update now.
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 confirmed it's redundant. Remove all default values
It's handled here:
App/src/libs/TransactionUtils.ts
Line 43 in 48b5a29
merchant = '', |
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.
Updated.
@aimane-chnaif Updated. |
BUG: merchant is replaced with description Screen.Recording.2023-12-01.at.5.03.06.PM.mov |
@aimane-chnaif Actually now, we are not handle merchant for split manual request in BE. I believe we are handling this in the PR which you're reviewing. |
The previous PR fix to display merchant for split scan request. |
So you tried to send merchant in split api commands and not working? |
@aimane-chnaif we don't pass merchant as param now in SplitBill API. Are we handling this here #30721? |
If you review code on that PR, not yet. |
@aimane-chnaif I just tested to pass merchant param to split bill and BE return merchant now. Do you think we can pass merchant param in this PR? |
yes. @pecanoro do you agree? |
I agree, if it's working as expected, I don't see why not. |
@aimane-chnaif Updated. |
@dukenv0307 conflicts |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.movAndroid: mWeb Chromemchrome.moviOS: Nativeios.moviOS: mWeb Safarimsafari.movMacOS: Chrome / Safariweb1.movweb2.movMacOS: Desktopdesktop.mov |
@aimane-chnaif Updated. |
src/libs/actions/IOU.js
Outdated
* @param {String} tag | ||
*/ | ||
function splitBillAndOpenReport(participants, currentUserLogin, currentUserAccountID, amount, comment, currency, category, tag) { | ||
const {splitData, splits, onyxData} = createSplitsAndOnyxData(participants, currentUserLogin, currentUserAccountID, amount, comment, currency, category, tag); | ||
function splitBillAndOpenReport(participants, currentUserLogin, currentUserAccountID, amount, comment, currency, category, merchant, tag) { |
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 update order so tag next to category and merchant is last?
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.
@aimane-chnaif Updated.
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.
Retested on latest branch.
LGTM 🎉
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Cherry-picked to staging by https://github.com/yuwenmemon in version: 1.4.7-4 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to staging by https://github.com/pecanoro in version: 1.4.8-0 🚀
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.4.8-3 🚀
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.4.8-3 🚀
|
Details
Fix optimistic merchant
Fixed Issues
$ #32183
PROPOSAL:
Tests
Offline tests
Same as above
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)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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
Screen.Recording.2023-11-29.at.23.46.25.mov
Android: mWeb Chrome
Screen.Recording.2023-11-29.at.23.42.45.mov
iOS: Native
Screen.Recording.2023-11-29.at.23.49.18.mov
iOS: mWeb Safari
Screen.Recording.2023-11-29.at.23.41.36.mov
MacOS: Chrome / Safari
Screen.Recording.2023-11-29.at.23.38.00.mov
MacOS: Desktop
Screen.Recording.2023-11-29.at.23.52.36.mov